1
0
Fork 0
mirror of https://code.forgejo.org/actions/ovh-dns-update synced 2025-03-15 14:54:40 +01:00

use inotifywait

This commit is contained in:
oliverpool 2023-08-19 20:36:15 +02:00
parent 85936cf5a9
commit 1957e53875
2 changed files with 8 additions and 4 deletions

View file

@ -15,11 +15,11 @@ jobs:
- name: run the fake API server
id: test
run: |
go test -c
touch delete_me_when_ready
# keep server running in the background
ACTION_TESTING=1 ./ovh-dns-update.test &
# wait for the output to be written (OVH_ENDPOINT)
sleep 1
ACTION_TESTING=1 go test . &
# wait for the OVH_ENDPOINT output to be written
inotifywait delete_me_when_ready
- name: update the record
uses: ./
with:

View file

@ -89,6 +89,10 @@ func TestRun(t *testing.T) {
}))
t.Cleanup(s.Close)
githubactions.SetOutput("OVH_ENDPOINT", "http://"+s.Listener.Addr().String())
err = os.Remove("delete_me_when_ready")
if err != nil {
t.Fatal(err)
}
select {}
}
}