Re-enabling the packet.net tests by looking up the project that has been pre-created
MODIFY
misc/test/examples_test.go
misc/test/examples_test.go
@@ -1063,8 +1063,6 @@ func TestAccGcpTsServerlessRaw(t *testing.T) {
}
func TestAccPacketPyWebserver(t *testing.T) {
- t.Skipf("skipping temporarily due to Packet auth failures")
-
test := getBaseOptions(t).
With(integration.ProgramTestOptions{
Dir: path.Join(getCwd(t), "..", "..", "packet-py-webserver"),
@@ -1074,8 +1072,6 @@ func TestAccPacketPyWebserver(t *testing.T) {
}
func TestAccPacketTsWebserver(t *testing.T) {
- t.Skipf("skipping temporarily due to Packet auth failures")
-
test := getBaseOptions(t).
With(integration.ProgramTestOptions{
Dir: path.Join(getCwd(t), "..", "..", "packet-ts-webserver"),

MODIFY
packet-py-webserver/__main__.py
packet-py-webserver/__main__.py
@@ -3,22 +3,20 @@ import pulumi_random as random
from pulumi import export
random_host_name = random.RandomPet("hostname")
-random_project_name = random.RandomPet("projectname")
-project = packet.Project(
- "project",
- name=random_project_name.id,
+project = packet.get_project(
+ name="ci-project"
)
vm = packet.Device(
"vm",
billing_cycle="hourly",
- facility="ewr1",
+ facilities=["ewr1"],
hostname=random_host_name.id,
operating_system="coreos_stable",
plan="baremetal_0",
project_id=project.id,
- ip_address_types=["public_ipv4"],
+ ip_address_types=["public_ipv4", "private_ipv4"],
)
export('ip', vm.access_public_ipv4)

MODIFY
packet-py-webserver/requirements.txt
packet-py-webserver/requirements.txt
pulumi>=1.0.0
-pulumi-packet>=1.0.0
+pulumi-packet>=1.4.0
pulumi-random>=1.0.0

MODIFY
packet-ts-webserver/index.ts
packet-ts-webserver/index.ts
@@ -4,11 +4,8 @@ import * as packet from "@pulumi/packet";
import * as random from "@pulumi/random";
const randomHostName = new random.RandomPet("hostname");
-const randomProjectName = new random.RandomPet("project-name");
-const project = new packet.Project("project", {
- name: randomProjectName.id,
-});
+const project = packet.getProject({name: "ci-project"});
const vm = new packet.Device("vm", {
facilities: [packet.Facilities.EWR1],

MODIFY
packet-ts-webserver/package.json
packet-ts-webserver/package.json
"@types/node": "^8.0.0"
},
"dependencies": {
- "@pulumi/packet": "latest",
+ "@pulumi/packet": "^1.4.0",
"@pulumi/random": "latest"
},
"license": "Apache-2.0"

Re-enabling the packet.net tests by looking up the project that has been pre-created