Skip to content

Commit

Permalink
Add Values file for UERANSIM to embedded files cncf/cnf-testsuite#1803
Browse files Browse the repository at this point in the history
  • Loading branch information
denverwilliams committed Aug 7, 2023
1 parent 7ca8e7c commit 5b99fd7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 123 deletions.
15 changes: 15 additions & 0 deletions spec/5g/5g_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@ describe "5g" do
File.copy("#{Dir.current}/spec/fixtures/udm-config-open5gs.yml", "#{Dir.current}/open5gs/charts/open5gs-udm/resources/config/udm.yaml")
Helm.install("open5gs #{Dir.current}/open5gs --values #{Dir.current}/spec/fixtures/5g-core-config.yml")
KubectlClient::Get.wait_for_install("open5gs-pcf")
$?.success?.should be_true
# (/PASSED: CNF compatible with both Calico and Cilium/ =~ response_s).should_not be_nil
end
end

#TODO exec tshark command: tshark -ni any -Y nas_5gs.mm.type_id -T json
#TODO parse tshark command
#TODO look for authentication text
# extra
#TODO look for connection text (sanity check)
#TODO tshark library
#TODO 5g tools library
#TODO 5g RAN and Core mobile traffic check (connection check)
#TODO 5g RAN (only) mobile traffic check ????
#TODO ueransim library (w/setup command)
#TODO Open5gs libary (w/setup command)


end
82 changes: 0 additions & 82 deletions spec/fixtures/5g-core-config.yml

This file was deleted.

32 changes: 0 additions & 32 deletions spec/fixtures/udm-config-open5gs.yml

This file was deleted.

1 change: 1 addition & 0 deletions src/tasks/constants.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ EmbeddedFileManager.constraint_template
EmbeddedFileManager.disable_cni
EmbeddedFileManager.fluentd_values
EmbeddedFileManager.fluentbit_values
EmbeddedFileManager.ues_values

EXCLUDE_NAMESPACES = [
"kube-system",
Expand Down
21 changes: 12 additions & 9 deletions src/tasks/utils/embedded_file_manager.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,36 @@ module EmbeddedFileManager
macro reboot_daemon
REBOOT_DAEMON = Base64.decode_string("{{ `cat ./tools/reboot_daemon/manifest.yml | base64` }}")
end
macro chaos_network_loss
macro chaos_network_loss
CHAOS_NETWORK_LOSS = Base64.decode_string("{{ `cat ./embedded_files/chaos_network_loss.yml | base64`}}")
end
macro chaos_cpu_hog
macro chaos_cpu_hog
CHAOS_CPU_HOG = Base64.decode_string("{{ `cat ./embedded_files/chaos_cpu_hog.yml | base64`}}")
end
macro chaos_container_kill
macro chaos_container_kill
CHAOS_CONTAINER_KILL = Base64.decode_string("{{ `cat ./embedded_files/chaos_container_kill.yml | base64`}}")
end
macro points_yml
macro points_yml
POINTSFILE = Base64.decode_string("{{ `cat ./embedded_files/points.yml | base64`}}")
end
macro enforce_image_tag
macro enforce_image_tag
ENFORCE_IMAGE_TAG = Base64.decode_string("{{ `cat ./embedded_files/enforce-image-tag.yml | base64`}}")
end
macro constraint_template
macro constraint_template
CONSTRAINT_TEMPLATE = Base64.decode_string("{{ `cat ./embedded_files/constraint_template.yml | base64`}}")
end
macro disable_cni
macro disable_cni
DISABLE_CNI = Base64.decode_string("{{ `cat ./embedded_files/kind-disable-cni.yaml | base64`}}")
end
macro fluentd_values
macro fluentd_values
FLUENTD_VALUES = Base64.decode_string("{{ `cat ./embedded_files/fluentd-values.yml | base64`}}")
end
macro fluentbit_values
macro fluentbit_values
FLUENTBIT_VALUES = Base64.decode_string("{{ `cat ./embedded_files/fluentbit-config.yml | base64`}}")
end
macro ues_values
UES_VALUES = Base64.decode_string("{{ `cat ./embedded_files/ues-values.yml | base64`}}")
end
def self.points_yml_write_file
File.write("points.yml", POINTSFILE)
end
Expand Down

0 comments on commit 5b99fd7

Please sign in to comment.