chore: re-enable-integration/rpc_test
@@ -19,6 +19,7 @@ package integration
import (
"context"
"fmt"
+ "io/ioutil"
"math/rand"
"net"
"net/http"
@@ -33,6 +34,7 @@ import (
"google.golang.org/grpc"
"github.com/GoogleContainerTools/skaffold/integration/skaffold"
+ event "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2"
"github.com/GoogleContainerTools/skaffold/proto/v1"
"github.com/GoogleContainerTools/skaffold/testutil"
)
@@ -58,9 +60,6 @@ func TestEnableRPCFlagDeprecation(t *testing.T) {
}
func TestEventsRPC(t *testing.T) {
- // TODO: This test shall pass once render v2 is completed.
- t.SkipNow()
-
MarkIntegrationTest(t, CanRunWithoutGcp)
rpcAddr := randomPort()
@@ -152,9 +151,6 @@ func TestEventsRPC(t *testing.T) {
}
func TestEventLogHTTP(t *testing.T) {
- // TODO: This test shall pass once render v2 is completed.
- t.SkipNow()
-
MarkIntegrationTest(t, CanRunWithoutGcp)
tests := []struct {
@@ -245,9 +241,6 @@ func TestEventLogHTTP(t *testing.T) {
}
func TestGetStateRPC(t *testing.T) {
- // TODO: This test shall pass once render v2 is completed.
- t.SkipNow()
-
MarkIntegrationTest(t, CanRunWithoutGcp)
rpcAddr := randomPort()
@@ -277,7 +270,6 @@ func TestGetStateRPC(t *testing.T) {
if client == nil {
t.Fatalf("error establishing skaffold grpc connection")
}
- /*
ctx, ctxCancel := context.WithCancel(context.Background())
defer ctxCancel()
@@ -286,7 +278,7 @@ func TestGetStateRPC(t *testing.T) {
var grpcState *proto.State
for i := 0; i < readRetries; i++ {
grpcState = retrieveRPCState(ctx, t, client)
- if grpcState != nil && checkBuildAndDeployComplete(*grpcState) {
+ if grpcState != nil && checkBuildAndDeployComplete(grpcState) {
success = true
break
}
@@ -295,14 +287,9 @@ func TestGetStateRPC(t *testing.T) {
if !success {
t.Errorf("skaffold build or deploy not complete. state: %+v\n", grpcState)
}
- */
}
-/*
func TestGetStateHTTP(t *testing.T) {
- // TODO: This test shall pass once render v2 is completed.
- t.SkipNow()
-
MarkIntegrationTest(t, CanRunWithoutGcp)
httpAddr := randomPort()
@@ -362,7 +349,6 @@ func retrieveHTTPState(t *testing.T, httpAddr string) *proto.State {
}
return httpState
}
-*/
func setupSkaffoldWithArgs(t *testing.T, args ...string) {
Run(t, "testdata/dev", "sh", "-c", "echo foo > foo")
@@ -393,8 +379,7 @@ func randomPort() string {
return strconv.Itoa(p)
}
-/*
-func checkBuildAndDeployComplete(state proto.State) bool {
+func checkBuildAndDeployComplete(state *proto.State) bool {
if state.BuildState == nil || state.DeployState == nil {
return false
}
@@ -407,7 +392,6 @@ func checkBuildAndDeployComplete(state proto.State) bool {
return state.DeployState.Status == event.Complete
}
-*/
func apiEvents(t *testing.T, rpcAddr string) (proto.SkaffoldServiceClient, chan *proto.LogEntry) { //nolint
client := setupRPCClient(t, rpcAddr)
