Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
config chain integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Jun 19, 2018
1 parent cc2d4e8 commit 8c56c9a
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 0 deletions.
40 changes: 40 additions & 0 deletions integration/config-chain/expected/.ship/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

---
assets:
v1:
- inline:
contents: |
#!/bin/bash
echo "t2: {{repl ConfigOption "t2_option" }}"
echo "t3: {{repl ConfigOption "t3_option" }}"
dest: ./scripts/install.sh
mode: 0777
- inline:
contents: |
#!/bin/bash
echo "testing testing {{repl ConfigOption "option" }}"
dest: ./scripts/test.sh
mode: 0777

config:
v1:
- name: option_chaining
title: Config Option Chaining
items:
- name: option
title: Base Option
type: text
- name: t2_option
title: Readonly Derivative
readonly: true
value: '{{repl ConfigOption "option" }}_{{repl ConfigOption "option" }}'
type: text
- name: t3_option
title: Tier Three Readonly Derivative
readonly: true
value: '{{repl ConfigOption "t2_option" }} + {{repl ConfigOption "option" }}'
type: text

lifecycle:
v1:
- render: {}
1 change: 1 addition & 0 deletions integration/config-chain/expected/.ship/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"option":"abc123","t2_option":"abc123_abc123","t3_option":"abc123_abc123 + abc123"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
echo "t2: abc123_abc123"
echo "t3: abc123_abc123 + abc123"
2 changes: 2 additions & 0 deletions integration/config-chain/expected/installer/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "testing testing abc123"
40 changes: 40 additions & 0 deletions integration/config-chain/input/.ship/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

---
assets:
v1:
- inline:
contents: |
#!/bin/bash
echo "t2: {{repl ConfigOption "t2_option" }}"
echo "t3: {{repl ConfigOption "t3_option" }}"
dest: ./scripts/install.sh
mode: 0777
- inline:
contents: |
#!/bin/bash
echo "testing testing {{repl ConfigOption "option" }}"
dest: ./scripts/test.sh
mode: 0777

config:
v1:
- name: option_chaining
title: Config Option Chaining
items:
- name: option
title: Base Option
type: text
- name: t2_option
title: Readonly Derivative
readonly: true
value: '{{repl ConfigOption "option" }}_{{repl ConfigOption "option" }}'
type: text
- name: t3_option
title: Tier Three Readonly Derivative
readonly: true
value: '{{repl ConfigOption "t2_option" }} + {{repl ConfigOption "option" }}'
type: text

lifecycle:
v1:
- render: {}
1 change: 1 addition & 0 deletions integration/config-chain/input/.ship/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"option":"abc123","t2_option":"abc123_abc123","t3_option":"abc123_abc123 + abc123"}
3 changes: 3 additions & 0 deletions integration/config-chain/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
customer_id: "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G"
installation_id: "t6-uzytbbkSoCiLtEfNO62LDIRLFec-2"
release_version: "0.0.1-test2"

0 comments on commit 8c56c9a

Please sign in to comment.