diff --git a/gateway/tests/integration/createfunction_test.go b/gateway/tests/integration/createfunction_test.go
index 8e1999aef92bb210c84b0ed4eec7c010e069c317..b18db4067537303954930b0399f146453dc5f292 100644
--- a/gateway/tests/integration/createfunction_test.go
+++ b/gateway/tests/integration/createfunction_test.go
@@ -46,8 +46,9 @@ func TestCreate_ValidRequest(t *testing.T) {
 		t.Fail()
 	}
 
-	if code != http.StatusOK {
-		t.Errorf("Got HTTP code: %d, want %d\n", code, http.StatusOK)
+	expectedErrorCode := http.StatusOK
+	if code != expectedErrorCode {
+		t.Errorf("Got HTTP code: %d, want %d\n", code, expectedErrorCode)
 		return
 	}