Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hack/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ _build/manager \
-zap-log-level debug \
-zap-encoder console \
-zap-time-encoding iso8601 \
-health-probe-bind-address "" \
>"$DATA_DIR/kcp-operator.log" 2>&1 &
OPERATOR_PID=$!
echo "Running as process $OPERATOR_PID."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package frontproxies
package e2e

import (
"context"
Expand Down
7 changes: 4 additions & 3 deletions test/e2e/rootshards/proxy_test.go → test/e2e/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package rootshards
package e2e

import (
"context"
"fmt"
"testing"
"time"

"github.com/davecgh/go-spew/spew"
"github.com/go-logr/logr"
kcpcorev1alpha1 "github.com/kcp-dev/kcp/sdk/apis/core/v1alpha1"
kcptenancyv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/tenancy/v1alpha1"
Expand Down Expand Up @@ -117,12 +118,12 @@ func TestRootShardProxy(t *testing.T) {
t.Fatalf("Failed to create workspace: %v", err)
}

err := wait.PollUntilContextTimeout(ctx, 500*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (done bool, err error) {
err := wait.PollUntilContextTimeout(ctx, 500*time.Millisecond, 3*time.Minute, false, func(ctx context.Context) (done bool, err error) {
err = rootShardClient.Get(ctx, ctrlruntimeclient.ObjectKeyFromObject(workspace), workspace)
if err != nil {
return false, err
}

spew.Dump(workspace.Status)
return workspace.Status.Phase == kcpcorev1alpha1.LogicalClusterPhaseReady, nil
})
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package rootshards
package e2e

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/shards/shards_test.go → test/e2e/shards_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package rootshards
package e2e

import (
"context"
Expand Down
6 changes: 3 additions & 3 deletions test/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ func CreateSelfDestructingNamespace(t *testing.T, ctx context.Context, client ct
t.Helper()

ns := corev1.Namespace{}
ns.Name = fmt.Sprintf("e2e-%s", name)
ns.Name = fmt.Sprintf("e2e-%s-%s", name, time.Now().Format("20060102150405"))

t.Logf("Creating namespace %s...", name)
t.Logf("Creating namespace %s...", ns.Name)
if err := client.Create(ctx, &ns); err != nil {
t.Fatal(err)
}

t.Cleanup(func() {
t.Logf("Deleting namespace %s...", name)
t.Logf("Deleting namespace %s...", ns.Name)
if err := client.Delete(ctx, &ns); err != nil {
t.Fatal(err)
}
Expand Down