コード例 #1
0
 def get_run_instance_env_var(self):
     assert get_run_instance_env_var() == get_from_field_ref(
         name=POLYAXON_KEYS_RUN_INSTANCE,
         field_path="metadata.labels['run_instance']",
     )
コード例 #2
0
 def test_get_from_field_ref(self):
     env_var = get_from_field_ref(name="test", field_path="metadata.name")
     assert env_var.name == "test"
     assert env_var.value_from.field_ref.field_path == "metadata.name"