Beispiel #1
0
    def test_get_refs(self, docker_client):
        ref = SecretReference("a", "a_name", "a_file", "0", "0", "292")

        s = SecretSpec(docker_client, spec={})
        s.set_ref("abcd", ref)

        assert s.get_refs("abcd") == [ref]
Beispiel #2
0
    def test_set_ref(self, docker_client):
        ref = SecretReference("a", "a_name", "a_file", "0", "0", "292")

        s = SecretSpec(docker_client, spec={})
        s.set_ref("abcd", ref)

        assert len(s.services) == 1
        assert s.services.get("abcd")["a"] == ref