Skip to content

Commit f5938bd

Browse files
Bug fixes, updates to functional tests
1 parent f519154 commit f5938bd

File tree

9 files changed

+20
-22
lines changed

9 files changed

+20
-22
lines changed

ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## version 0.0.8
4+
5+
## Bugfixes
6+
7+
* Fix problem with home folder resolution on Windows
8+
* Add ipv6 DNS entries for resources
9+
310
## version 0.0.7
411

512
## Ingress

functional_tests/features/documentaion.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Feature: Docmentation
77
Given I apply the config "./test_fixtures/docs"
88
And there should be 1 container running called "docs.docs.shipyard.run"
99
And there should be 1 container running called "terminal.docs.shipyard.run"
10-
And a call to "http://localhost:8080/" should result in status 200
10+
And a call to "http://docs.docs.shipyard.run:8080/" should result in status 200

functional_tests/features/single_container.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Feature: Docker Container
77
Then there should be 1 network called "onprem"
88
And there should be 1 container running called "consul.container.shipyard.run"
99
And there should be 1 container running called "consul-http.ingress.shipyard.run"
10-
And a call to "http://localhost:18500/v1/agent/members" should result in status 200
10+
And a call to "http://consul-http.ingress.shipyard.run:18500/v1/agent/members" should result in status 200
1111

1212
Scenario: Single Container from Github Blueprint
1313
Given I apply the config "github.com/shipyard-run/shipyard/functional_tests/test_fixtures//single_container"
1414
Then there should be 1 network called "onprem"
1515
And there should be 1 container running called "consul.container.shipyard.run"
1616
And there should be 1 container running called "consul-http.ingress.shipyard.run"
17-
And a call to "http://localhost:18500/v1/agent/members" should result in status 200
17+
And a call to "http://consul-http.ingress.shipyard.run:18500/v1/agent/members" should result in status 200

functional_tests/features/single_k3s_cluster.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Feature: Kubernetes Cluster
88
Then there should be 1 network called "cloud"
99
And there should be 1 container running called "server.k3s.k8s_cluster.shipyard.run"
1010
And there should be 1 container running called "consul-http.ingress.shipyard.run"
11-
And a call to "http://localhost:18500/v1/agent/members" should result in status 200
11+
And a call to "http://consul-http.ingress.shipyard.run:18500/v1/agent/members" should result in status 200

functional_tests/test_fixtures/single_container/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: Single Container Example
33
author: Nic Jackson
44
slug: single_container
5-
browser_windows: http://localhost:8080
5+
browser_windows: http://localhost:8500
66
---
77

88
# Single Container
99

1010
This blueprint shows how you can create a single container with Shipyard
1111

1212
```shell
13-
curl localhost:8080
13+
curl localhost:8500
1414
```

functional_tests/test_fixtures/single_container/container.hcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@ container "consul" {
2828
key ="abc"
2929
value = "123"
3030
}
31+
32+
env {
33+
key ="abc"
34+
value = "${shipyard()}"
35+
}
3136
}

functional_tests/test_fixtures/single_container/ingress.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ container_ingress "consul-http" {
88
port {
99
local = 8500
1010
remote = 8500
11-
host = 18500
11+
host = 8500
1212
}
1313
}

pkg/config/parse_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestRunParsesBlueprintInMarkdownFormat(t *testing.T) {
3131
assert.Equal(t, "Nic Jackson", c.Blueprint.Author)
3232
assert.Equal(t, "Single Container Example", c.Blueprint.Title)
3333
assert.Equal(t, "single_container", c.Blueprint.Slug)
34-
assert.Equal(t, []string{"http://localhost:8080"}, c.Blueprint.BrowserWindows)
34+
assert.Equal(t, []string{"http://localhost:8500"}, c.Blueprint.BrowserWindows)
3535
assert.Contains(t, c.Blueprint.Intro, "# Single Container")
3636
}
3737

pkg/config/parser.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -461,27 +461,13 @@ func buildContext() *hcl.EvalContext {
461461
})
462462

463463
var HomeFunc = function.New(&function.Spec{
464-
Params: []function.Parameter{
465-
{
466-
Name: "home",
467-
Type: cty.NilType,
468-
AllowDynamicType: true,
469-
},
470-
},
471464
Type: function.StaticReturnType(cty.String),
472465
Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) {
473466
return cty.StringVal(utils.HomeFolder()), nil
474467
},
475468
})
476469

477470
var ShipyardFunc = function.New(&function.Spec{
478-
Params: []function.Parameter{
479-
{
480-
Name: "shipyard",
481-
Type: cty.NilType,
482-
AllowDynamicType: true,
483-
},
484-
},
485471
Type: function.StaticReturnType(cty.String),
486472
Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) {
487473
return cty.StringVal(utils.ShipyardHome()), nil

0 commit comments

Comments
 (0)