Skip to content

Commit

Permalink
fix: ensure tests are run during node re-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cleverley-Prance committed Feb 22, 2022
1 parent bc9b4a4 commit 819b935
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion terraform/modules/AWS/Kubernetes/test.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
resource "null_resource" "master_test" {
count = var.number_of_master_instances

triggers = {
cluster_instance_ids = "${join(",", aws_instance.simulator_master_instances.*.id)}"
}

connection {
bastion_host = var.bastion_public_ip
bastion_private_key = file(pathexpand("~/.kubesim/cp_simulator_rsa"))
Expand Down Expand Up @@ -41,6 +45,10 @@ resource "null_resource" "master_test" {
resource "null_resource" "node_test" {
count = var.number_of_cluster_instances

triggers = {
cluster_instance_ids = "${join(",", aws_instance.simulator_node_instances.*.id)}"
}

connection {
bastion_host = var.bastion_public_ip
bastion_private_key = file(pathexpand("~/.kubesim/cp_simulator_rsa"))
Expand All @@ -55,6 +63,7 @@ resource "null_resource" "node_test" {
agent = "false"
private_key = file(pathexpand("~/.kubesim/cp_simulator_rsa"))


// Increase the timeout so the server has time to reboot
timeout = "10m"
}
Expand All @@ -77,4 +86,3 @@ resource "null_resource" "node_test" {
]
}
}

0 comments on commit 819b935

Please sign in to comment.