cmd/osbuild-worker-executor: import verbatim from mvo5/oaas
This commit imports the repository https://github.com/mvo5/oaas without keeping the history. The history is largely unimportant and can be looked up in https://github.com/mvo5/oaas/commits/main if needed.
This commit is contained in:
parent
fa416e4545
commit
372d9f07dd
12 changed files with 1024 additions and 0 deletions
18
cmd/osbuild-worker-executor/handler_root_test.go
Normal file
18
cmd/osbuild-worker-executor/handler_root_test.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package main_test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestTrivialRootEndpoint(t *testing.T) {
|
||||
baseURL, _, loggerHook := runTestServer(t)
|
||||
|
||||
endpoint := baseURL
|
||||
resp, err := http.Get(endpoint)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, resp.StatusCode, 200)
|
||||
assert.Equal(t, loggerHook.LastEntry().Message, "/ handler called")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue