Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
weiiwang01 committed Jun 18, 2023
1 parent 1ea8a06 commit effcdb5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/start_e2e_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
import string
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
run_id = "".join(random.choice(string.ascii_lowercase) for _ in range(8))
f.write(f"run-id={run_id}\n")
f.write(f"run-id=e2e-{run_id}\n")
- name: Deploy github-runner Charm
run: |
Expand Down Expand Up @@ -180,5 +180,6 @@ jobs:
if [[ $status != "completed" || $conclusion != "success" ]]; then
echo "test workflow failed with status: $status, conclusion: $conclusion"
exit 1
fi
4 changes: 1 addition & 3 deletions src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ def _ensure_runner_profile(self) -> None:
"""
if not self._clients.lxd.profiles.exists("runner"):
logger.info("Creating runner LXD profile")
profile_config = {
"security.nesting": "true",
}
profile_config = {}
if _LXD_PROFILE_YAML.exists():
additional_configs = yaml.safe_load(_LXD_PROFILE_YAML.read_text())["config"]
profile_config.update({k: json.dumps(v) for k, v in additional_configs.items()})
Expand Down
4 changes: 3 additions & 1 deletion templates/pre-job.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
#!/usr/bin/env bash

python3 - | << EOF
import os
import json
import requests
Expand Down Expand Up @@ -31,3 +32,4 @@ response = session.post("http://{{host_ip}}:8080/check-run", timeout=10, json={
"commit_sha": commit_sha
})
response.raise_for_status()
EOF

0 comments on commit effcdb5

Please sign in to comment.