-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
denysa: add 007 ueransim test. (#81)
- Loading branch information
1 parent
873dbf8
commit c958db9
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha2 | ||
kind: PackageVariantSet | ||
metadata: | ||
name: edge-free5gc-ueransim | ||
spec: | ||
upstream: | ||
repo: nephio-example-packages | ||
package: ueransim | ||
revision: v1 | ||
targets: | ||
- objectSelector: | ||
apiVersion: infra.nephio.org/v1alpha1 | ||
kind: WorkloadCluster | ||
matchLabels: | ||
nephio.org/site-type: edge | ||
template: | ||
downstream: | ||
package: free5gc-ueransim | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
injectors: | ||
- nameExpr: target.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
# SPDX-license-identifier: Apache-2.0 | ||
############################################################################## | ||
# Copyright (c) 2023 The Nephio Authors. | ||
# All rights reserved. This program and the accompanying materials | ||
# are made available under the terms of the Apache License, Version 2.0 | ||
# which accompanies this distribution, and is available at | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
############################################################################## | ||
|
||
## TEST METADATA | ||
## TEST-NAME: Deploy ueransim to edge clusters | ||
## | ||
|
||
set -o pipefail | ||
set -o errexit | ||
set -o nounset | ||
[[ "${DEBUG:-false}" != "true" ]] || set -o xtrace | ||
|
||
export HOME=${HOME:-/home/ubuntu/} | ||
export E2EDIR=${E2EDIR:-$HOME/test-infra/e2e} | ||
export TESTDIR=${TESTDIR:-$E2EDIR/tests} | ||
export LIBDIR=${LIBDIR:-$E2EDIR/lib} | ||
|
||
source "${LIBDIR}/k8s.sh" | ||
|
||
kubeconfig="$HOME/.kube/config" | ||
|
||
k8s_apply "$kubeconfig" "$TESTDIR/007-edge-free5gc-ueransim.yaml" | ||
|
||
for cluster in "edge01" "edge02"; do | ||
k8s_wait_exists "$kubeconfig" 600 "default" "packagevariant" "edge-free5gc-ueransim-${cluster}-free5gc-ueransim" | ||
done | ||
|
||
for cluster in "edge01" "edge02"; do | ||
k8s_wait_ready "$kubeconfig" 600 "default" "packagevariant" "edge-free5gc-ueransim-${cluster}-free5gc-ueransim" | ||
done | ||
|
||
for cluster in "edge01" "edge02"; do | ||
cluster_kubeconfig=$(k8s_get_capi_kubeconfig "$kubeconfig" "default" "$cluster") | ||
k8s_wait_exists "$cluster_kubeconfig" 600 "ueransim" "deployment" "ueransim-gnb" | ||
k8s_wait_exists "$cluster_kubeconfig" 600 "ueransim" "deployment" "ueransim-ue" | ||
k8s_wait_ready_replicas "$cluster_kubeconfig" 600 "ueransim" "deployment" "ueransim-gnb" | ||
k8s_wait_ready_replicas "$cluster_kubeconfig" 600 "ueransim" "deployment" "ueransim-ue" | ||
ue_pod_name=${kubectl --kubeconfig $cluster_kubeconfig get pods -n ueransim -l app=ueransim -l component=ue} | ||
k8s_exec $cluster_kubeconfig "ueransim" $ue_pod_name "ping -I uesimtun0 google.com" | ||
done |