mirror of
https://code.forgejo.org/actions/ovh-dns-update
synced 2025-03-15 06:46:59 +01:00
use inotifywait
This commit is contained in:
parent
85936cf5a9
commit
1957e53875
2 changed files with 8 additions and 4 deletions
|
@ -15,11 +15,11 @@ jobs:
|
||||||
- name: run the fake API server
|
- name: run the fake API server
|
||||||
id: test
|
id: test
|
||||||
run: |
|
run: |
|
||||||
go test -c
|
touch delete_me_when_ready
|
||||||
# keep server running in the background
|
# keep server running in the background
|
||||||
ACTION_TESTING=1 ./ovh-dns-update.test &
|
ACTION_TESTING=1 go test . &
|
||||||
# wait for the output to be written (OVH_ENDPOINT)
|
# wait for the OVH_ENDPOINT output to be written
|
||||||
sleep 1
|
inotifywait delete_me_when_ready
|
||||||
- name: update the record
|
- name: update the record
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -89,6 +89,10 @@ func TestRun(t *testing.T) {
|
||||||
}))
|
}))
|
||||||
t.Cleanup(s.Close)
|
t.Cleanup(s.Close)
|
||||||
githubactions.SetOutput("OVH_ENDPOINT", "http://"+s.Listener.Addr().String())
|
githubactions.SetOutput("OVH_ENDPOINT", "http://"+s.Listener.Addr().String())
|
||||||
|
err = os.Remove("delete_me_when_ready")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
select {}
|
select {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue