add PR testing #1
Loading…
Reference in a new issue
No description provided.
Delete branch "testing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Testing the action does:
ovh-endpoint
v=42
instead ofv=1.42
)WIP: add pr workflowto add PR testing@ -43,0 +69,4 @@
msg := fmt.Sprintf("unexpected body: %s", string(buf))
http.Error(w, msg, http.StatusBadRequest)
t.Error(msg)
}
Almost perfect except the action above will succeed if nothing happens at all. To verify this code path is covered something like writting buf to
/tmp/payload
could be used here. And in a step that follows the use: ./ you could loop waiting for/tmp/payload
to exist and verify it contains thev=1.42
string. That would be proof the action was successful.Or... maybe I'm missing some other proof of success?
Thanks for the review!
You are right, that if the
action.yml
did nothing at all, the test would still pass.After a lot of trial and error, I have refactored it to check the updated record at a later stage.
I first tried to set an
output
from the testing server, but it does on appear if written after the stage (the testing server is running in the background). So I write a normal filedns.txt
with the record,Excellent.