Update E2E test workflow. (#2395)

This commit is contained in:
Tingluo Huang
2023-03-14 09:00:07 -04:00
committed by GitHub
parent bd9f32e354
commit 261d4371b5
5 changed files with 179 additions and 83 deletions

View File

@@ -92,11 +92,11 @@ func TestARCJobs(t *testing.T) {
)
t.Run("Get available pods during job run", func(t *testing.T) {
c := http.Client{}
dateTime := os.Getenv("DATE_TIME")
targetArcName := os.Getenv("ARC_NAME")
// We are triggering manually a workflow that already exists in the repo.
// This workflow is expected to spin up a number of runner pods matching the runners value set in podCountsByType.
url := "https://api.github.com/repos/actions-runner-controller/arc_e2e_test_dummy/actions/workflows/e2e-test-dispatch-workflow.yaml/dispatches"
jsonStr := []byte(fmt.Sprintf(`{"ref":"main", "inputs":{"date_time":"%s"}}`, dateTime))
url := "https://api.github.com/repos/actions-runner-controller/arc_e2e_test_dummy/actions/workflows/arc-test-workflow.yaml/dispatches"
jsonStr := []byte(fmt.Sprintf(`{"ref":"main", "inputs":{"arc_name":"%s"}}`, targetArcName))
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr))
if err != nil {