mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
fix: test kubernetes manifest
nix-repl> test-nginx = g.config.testing.testsByName.nginx-deployment.evaled.config.kubernetes.resources.deployments.nginx nix-repl> test-nginx.spec.template.spec.containers.nginx.image "nginx:dy4y4j45arjj9sgyjb90sv035sxglpv8" vs nix-repl> nginx = g.config.kubernetes.resources.deployments.nginx nix-repl> nginx.spec.template.spec.containers.nginx.image "docker.io/gatehub/nginx:dy4y4j45arjj9sgyjb90sv035sxglpv8"
This commit is contained in:
parent
80d3a595f5
commit
0c99276b50
3 changed files with 5 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, kubenix, ... }:
|
{ config, lib, pkgs, kubenix, test, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@ with lib;
|
||||||
name = "nginx-deployment";
|
name = "nginx-deployment";
|
||||||
description = "Test testing nginx deployment";
|
description = "Test testing nginx deployment";
|
||||||
script = ''
|
script = ''
|
||||||
@pytest.mark.applymanifest('${config.kubernetes.resultYAML}')
|
@pytest.mark.applymanifest('${test.kubernetes.resultYAML}')
|
||||||
def test_nginx_deployment(kube):
|
def test_nginx_deployment(kube):
|
||||||
"""Tests whether nginx deployment gets successfully created"""
|
"""Tests whether nginx deployment gets successfully created"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ let
|
||||||
kubenix.project = mkDefault config.name;
|
kubenix.project = mkDefault config.name;
|
||||||
_module.args = {
|
_module.args = {
|
||||||
inherit kubenix;
|
inherit kubenix;
|
||||||
test = config;
|
test = evaled.config;
|
||||||
} // testing.args;
|
} // testing.args;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, kubenix, images, ... }:
|
{ config, lib, pkgs, kubenix, images, test, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
|
@ -47,7 +47,7 @@ in
|
||||||
script = ''
|
script = ''
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@pytest.mark.applymanifest('${config.kubernetes.resultYAML}')
|
@pytest.mark.applymanifest('${test.kubernetes.resultYAML}')
|
||||||
def test_deployment(kube):
|
def test_deployment(kube):
|
||||||
"""Tests whether deployment gets successfully created"""
|
"""Tests whether deployment gets successfully created"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue