internal/osbuildexecutor: verify expected input from handleBuild
This commit is contained in:
parent
8a5f486715
commit
971e1df148
1 changed files with 4 additions and 0 deletions
|
|
@ -68,6 +68,10 @@ func TestWriteInputArchive(t *testing.T) {
|
|||
|
||||
func TestHandleBuild(t *testing.T) {
|
||||
buildServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
input, err := io.ReadAll(r.Body)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, []byte("test"), input)
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
osbuildResult := osbuild.Result{
|
||||
Success: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue