Remove dead Python integration tests (#6315)
These test files are no longer used. All the Python integration tests now use venv.
This commit is contained in:
parent
1a9050eaa6
commit
0059cf205e
|
@ -1,5 +0,0 @@
|
|||
*.pyc
|
||||
/.pulumi/
|
||||
/dist/
|
||||
/*.egg-info
|
||||
venv/
|
|
@ -1,3 +0,0 @@
|
|||
name: config_basic_py
|
||||
description: A simple Python program that uses configuration.
|
||||
runtime: python
|
|
@ -1,53 +0,0 @@
|
|||
# Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import pulumi
|
||||
|
||||
# Just test that basic config works.
|
||||
config = pulumi.Config('config_basic_py')
|
||||
|
||||
# This value is plaintext and doesn't require encryption.
|
||||
value = config.require('aConfigValue')
|
||||
assert value == 'this value is a Pythonic value'
|
||||
|
||||
# This value is a secret and is encrypted using the passphrase `supersecret`.
|
||||
secret = config.require('bEncryptedSecret')
|
||||
assert secret == 'this super Pythonic secret is encrypted'
|
||||
|
||||
test_data = [
|
||||
{
|
||||
'key': 'outer',
|
||||
'expected_json': '{"inner":"value"}',
|
||||
'expected_object': { 'inner': 'value' }
|
||||
},
|
||||
{
|
||||
'key': 'names',
|
||||
'expected_json': '["a","b","c","super secret name"]',
|
||||
'expected_object': ['a', 'b', 'c', 'super secret name']
|
||||
},
|
||||
{
|
||||
'key': 'servers',
|
||||
'expected_json': '[{"host":"example","port":80}]',
|
||||
'expected_object': [{ 'host': 'example', 'port': 80 }]
|
||||
},
|
||||
{
|
||||
'key': 'a',
|
||||
'expected_json': '{"b":[{"c":true},{"c":false}]}',
|
||||
'expected_object': { 'b': [{ 'c': True }, { 'c': False }] }
|
||||
},
|
||||
{
|
||||
'key': 'tokens',
|
||||
'expected_json': '["shh"]',
|
||||
'expected_object': ['shh']
|
||||
},
|
||||
{
|
||||
'key': 'foo',
|
||||
'expected_json': '{"bar":"don\'t tell"}',
|
||||
'expected_object': { 'bar': "don't tell" }
|
||||
}
|
||||
]
|
||||
|
||||
for test in test_data:
|
||||
json = config.require(test['key'])
|
||||
obj = config.require_object(test['key'])
|
||||
assert json == test['expected_json']
|
||||
assert obj == test['expected_object']
|
|
@ -1,5 +0,0 @@
|
|||
*.pyc
|
||||
/.pulumi/
|
||||
/dist/
|
||||
/*.egg-info
|
||||
venv/
|
|
@ -1,3 +0,0 @@
|
|||
name: dynamic_py
|
||||
description: A simple Python program that uses dynamic providers.
|
||||
runtime: python
|
|
@ -1,21 +0,0 @@
|
|||
# Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
import binascii
|
||||
import os
|
||||
from pulumi import ComponentResource, export
|
||||
from pulumi.dynamic import Resource, ResourceProvider, CreateResult
|
||||
|
||||
class RandomResourceProvider(ResourceProvider):
|
||||
def create(self, props):
|
||||
val = binascii.b2a_hex(os.urandom(15)).decode("ascii")
|
||||
return CreateResult(val, { "val": val })
|
||||
|
||||
class Random(Resource):
|
||||
val: str
|
||||
def __init__(self, name, opts = None):
|
||||
super().__init__(RandomResourceProvider(), name, {"val": ""}, opts)
|
||||
|
||||
r = Random("foo")
|
||||
|
||||
export("random_id", r.id)
|
||||
export("random_val", r.val)
|
|
@ -1 +0,0 @@
|
|||
Intentionally make no changes.
|
|
@ -1,5 +0,0 @@
|
|||
*.pyc
|
||||
/.pulumi/
|
||||
/dist/
|
||||
/*.egg-info
|
||||
venv/
|
|
@ -1,3 +0,0 @@
|
|||
name: emptypy
|
||||
description: An empty Python Pulumi program.
|
||||
runtime: python
|
|
@ -1,7 +0,0 @@
|
|||
# Copyright 2016-2018, Pulumi Corporation. All rights reserved.
|
||||
|
||||
def main():
|
||||
return None
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in a new issue