Creates the necessary resources for the components test to run. - Creates a named tunnel with a random name. - Creates a random CNAME DNS entry for that tunnel. Those created resources are added to the config (obtained from an environment variable). The resulting configuratio
()
| 109 | |
| 110 | |
| 111 | def create(): |
| 112 | """ |
| 113 | Creates the necessary resources for the components test to run. |
| 114 | - Creates a named tunnel with a random name. |
| 115 | - Creates a random CNAME DNS entry for that tunnel. |
| 116 | |
| 117 | Those created resources are added to the config (obtained from an environment variable). |
| 118 | The resulting configuration is persisted for the tests to use. |
| 119 | """ |
| 120 | config = get_config_from_env() |
| 121 | origincert_path = persist_origin_cert(config) |
| 122 | |
| 123 | random_uuid = str(uuid.uuid4()) |
| 124 | config["tunnel"] = create_tunnel(config, origincert_path, random_uuid) |
| 125 | config["ingress"] = [ |
| 126 | { |
| 127 | "hostname": create_named_dns(config, random_uuid), |
| 128 | "service": "hello_world" |
| 129 | }, |
| 130 | { |
| 131 | "service": "http_status:404" |
| 132 | } |
| 133 | ] |
| 134 | |
| 135 | persist_config(config) |
| 136 | |
| 137 | |
| 138 | def cleanup(): |
no test coverage detected
searching dependent graphs…