Skip to content

Commit

Permalink
more todos 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 4091cce commit 846e30d
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 6 deletions.
22 changes: 22 additions & 0 deletions src/tasks/utils/ueransim.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require "cluster_tools"
module UERANSIM
# MYSQL_PORT = "3306"
# def self.match()
# ClusterTools.local_match_by_image_name(["mysql/mysql-server","bitnami/mysql"])
# # ClusterTools.local_match_by_image_name("bitnami/mysql")
# end
def self.uninstall
Log.for("verbose").info { "uninstall_ueransim" }
Helm.delete("ueransim")
end

# todo make this work without having the test-suite src
def self.install
Log.info {"Installing mysql-operator "}
Helm.install("ueransim")
KubectlClient::Get.resource_wait_for_install("Pod", "ueransim")
end


end

32 changes: 32 additions & 0 deletions src/tasks/vertical/5g.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding: utf-8
require "sam"
require "file_utils"
require "colorize"
require "totem"
require "docker_client"
require "halite"
require "totem"
require "k8s_netstat"
require "kernel_introspection"
require "k8s_kernel_introspection"
require "../utils/utils.cr"

desc "The CNF test suite checks to see if a 5gCore installed in K8s responds properly"
task "5gCore", ["supi_enabled"] do |_, args|
stdout_score("5g")
case "#{ARGV.join(" ")}"
when /5g/
stdout_info "Results have been saved to #{CNFManager::Points::Results.file}".colorize(:green)
end
end

#todo set up a UE and Ran simulator (ueransim) to test the 5g core
#todo modify ueransime to use supi (5g authenticatio)
#todo set up tshark to test authentication on the wire
#todo check the wire using tshark to see if authenticaion worked

desc "To check if the 5g core has supi enabled (5g authentication)"
task "supi_enabled", [""] do |_, args|

end

14 changes: 8 additions & 6 deletions src/tasks/workload/5g.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ task "suci_enabled" do |_, args|
test_name = "specialized_init_system"
CNFManager::Task.task_runner(args) do |args, config|
Log.info { "Running #{test_name} test" }
ClusterTools.exec("tshark -ni any -Y nas_5gs.mm.type_id -T json > test.log")

#todo put in prereq
Helm.fetch("openverso/ueransim-gnb --version 0.2.5 --untar")

File.write("gnb-ues-values.yaml", UES_VALUES)


Helm.install("ueransim #{Dir.current}/ueransim-gnb --values ./gnb-ues-values.yaml")

#TODO cluster_tools exec tshark command: tshark -ni any -Y nas_5gs.mm.type_id -T json > test.file
#TODO look for connection text (sanity check)
ClusterTools.exec("tshark -ni any -Y nas_5gs.mm.type_id -T json > test.log")

#TODO exec tshark command: tshark -ni any -Y nas_5gs.mm.type_id -T json
#todo cluster_tools exec get text-<uniqueid>.file
#TODO parse tshark command
#TODO look for authentication text
#todo cluster_tools exec delete text-<uniqueid>.file


# 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)
Expand Down

0 comments on commit 846e30d

Please sign in to comment.