k9s: add module
This commit is contained in:
parent
186d9399f9
commit
7dc4e4ebd7
11 changed files with 153 additions and 0 deletions
4
tests/modules/programs/k9s/default.nix
Normal file
4
tests/modules/programs/k9s/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
k9s-example-settings = ./example-settings.nix;
|
||||
k9s-empty-settings = ./empty-settings.nix;
|
||||
}
|
||||
11
tests/modules/programs/k9s/empty-settings.nix
Normal file
11
tests/modules/programs/k9s/empty-settings.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.k9s.enable = true;
|
||||
|
||||
test.stubs.k9s = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/k9s
|
||||
'';
|
||||
}
|
||||
5
tests/modules/programs/k9s/example-config-expected.yml
Normal file
5
tests/modules/programs/k9s/example-config-expected.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
k9s:
|
||||
enableMouse: true
|
||||
headless: false
|
||||
maxConnRetry: 5
|
||||
refreshRate: 2
|
||||
42
tests/modules/programs/k9s/example-settings.nix
Normal file
42
tests/modules/programs/k9s/example-settings.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.k9s = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
|
||||
settings = {
|
||||
k9s = {
|
||||
refreshRate = 2;
|
||||
maxConnRetry = 5;
|
||||
enableMouse = true;
|
||||
headless = false;
|
||||
};
|
||||
};
|
||||
|
||||
skin = {
|
||||
k9s = {
|
||||
body = {
|
||||
fgColor = "dodgerblue";
|
||||
bgColor = "#ffffff";
|
||||
logoColor = "#0000ff";
|
||||
};
|
||||
info = {
|
||||
fgColor = "lightskyblue";
|
||||
sectionColor = "steelblue";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/k9s/config.yml
|
||||
assertFileContent \
|
||||
home-files/.config/k9s/config.yml \
|
||||
${./example-config-expected.yml}
|
||||
assertFileExists home-files/.config/k9s/skin.yml
|
||||
assertFileContent \
|
||||
home-files/.config/k9s/skin.yml \
|
||||
${./example-skin-expected.yml}
|
||||
'';
|
||||
}
|
||||
8
tests/modules/programs/k9s/example-skin-expected.yml
Normal file
8
tests/modules/programs/k9s/example-skin-expected.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
k9s:
|
||||
body:
|
||||
bgColor: '#ffffff'
|
||||
fgColor: dodgerblue
|
||||
logoColor: '#0000ff'
|
||||
info:
|
||||
fgColor: lightskyblue
|
||||
sectionColor: steelblue
|
||||
Loading…
Add table
Add a link
Reference in a new issue