コード例 #1
0
    def test_make_pod_envconfig(self) -> NoReturn:
        """Testing make pod envconfig."""

        expected_result = {
            "MYSQL_ROOT_PASSWORD": "******",
        }
        pod_envconfig = pod_spec._make_pod_envconfig()
        self.assertEqual(expected_result, pod_envconfig)
コード例 #2
0
    def test_make_pod_envconfig(self) -> NoReturn:
        """Teting make pod envconfig configuration."""

        expected_result = {
            "ALLOW_ANONYMOUS_LOGIN": "******",
            "MODEL": "rantest",
        }
        pod_envconfig = pod_spec._make_pod_envconfig("rantest")
        self.assertDictEqual(expected_result, pod_envconfig)
コード例 #3
0
ファイル: test_pod_spec.py プロジェクト: charmed-osm/5g-core
 def test_make_pod_envconfig(self) -> NoReturn:
     """Testing make pod envconfig configuration."""
     expected_result = {
         "UE_RANGE": "60.60.0.0/24",
         "STATIC_IP": "192.168.70.15",
     }
     ue_range = {"ue_range": "60.60.0.0/24"}
     ipadd = {"natapp_ip": "192.168.70.15"}
     pod_envconfig = pod_spec._make_pod_envconfig(ue_range, ipadd)
     self.assertDictEqual(expected_result, pod_envconfig)
コード例 #4
0
    def test_make_pod_envconfig(self) -> NoReturn:
        """Teting make pod envconfig configuration."""

        expected_result = {
            "ALLOW_ANONYMOUS_LOGIN": "******",
            "RELATION": "ran",
        }
        relation_state = {"ran_host": "ran"}
        pod_envconfig = pod_spec._make_pod_envconfig(relation_state)
        self.assertDictEqual(expected_result, pod_envconfig)
コード例 #5
0
ファイル: test_pod_spec.py プロジェクト: charmed-osm/5g-core
 def test_make_pod_envconfig(self) -> NoReturn:
     """Testing make pod envconfig configuration."""
     expected_result = {
         "ALLOW_ANONYMOUS_LOGIN": "******",
         "GIN_MODE": "release",
         "IPADDR1": "127.0.0.1",
         "NRF_HOST": "nrf",
     }
     mode = {"gin_mode": "release"}
     relation = {"upf_host": "127.0.0.1", "nrf_host": "nrf"}
     pod_envconfig = pod_spec._make_pod_envconfig(mode, relation)
     self.assertDictEqual(expected_result, pod_envconfig)
コード例 #6
0
    def test_make_pod_envconfig(self) -> NoReturn:
        """Testing make pod envconfig."""

        expected_result = {
            "MYSQL_HOST": "mysql-endpoints",
            "MYSQL_USER": "******",
            "MYSQL_ROOT_PASSWORD": "******",
        }
        relation_state = {
            "db": "mysql",
            "user": "******",
            "pwd": "root",
        }
        pod_envconfig = pod_spec._make_pod_envconfig(relation_state)
        self.assertEqual(expected_result, pod_envconfig)
コード例 #7
0
ファイル: test_pod_spec.py プロジェクト: charmed-osm/5g-core
    def test_make_pod_envconfig(self) -> NoReturn:
        """Testing make pod envconfig configuration."""

        expected_result = {
            "ALLOW_ANONYMOUS_LOGIN": "******",
            "MONGODB_URI": "mongodb://mongodb/free5gc",
            "GIN_MODE": "release",
            "MONGODB_HOST": "mongodb",
        }
        mode = {"gin_mode": "release"}
        relation = {
            "mongodb_uri": "mongodb://mongodb/free5gc",
            "mongodb_host": "mongodb",
        }
        pod_envconfig = pod_spec._make_pod_envconfig(mode, relation)
        self.assertDictEqual(expected_result, pod_envconfig)