Skip to content

Commit

Permalink
files for tidb
Browse files Browse the repository at this point in the history
  • Loading branch information
shuaiwang516 authored and tylergu committed May 11, 2022
1 parent 6a67438 commit b99059d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ python3 acto.py --seed data/redis-operator/cr.yaml \
--duration 1
```

**tidb-operator**
```
python3 acto.py --seed data/tidb-operator/cr.yaml \
--helm data/tidb-operator/tidb-operator \
--init data/tidb-operator/crd.yaml \
--context data/tidb-operator/context.json \
--custom-fields data.tidb-operator.prune \
--crd-name tidbclusters.pingcap.com \
--duration 1
```

## Porting operators
Acto aims to automate the E2E testing as much as possible to minimize users' labor.
Expand Down
1 change: 0 additions & 1 deletion data/tidb-operator/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: pingcap.com/v1alpha1
kind: TidbCluster
metadata:
name: advanced-tidb
namespace: default
spec:
version: "v5.4.0"
timezone: UTC
Expand Down
2 changes: 1 addition & 1 deletion deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Helm(Deploy):

def deploy(self, context):
if self.init_yaml:
sh.kubectl("apply",
sh.kubectl("apply", server_side=True,
filename=self.init_yaml,
namespace=CONST.ACTO_NAMESPACE)
context['namespace'] = CONST.ACTO_NAMESPACE
Expand Down
5 changes: 5 additions & 0 deletions schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,16 @@ def num_fields(self):

def test_cases(self):
return []

def get_all_schemas(self):
return []


def extract_schema(path: list, schema: dict) -> object:
if 'anyOf' in schema:
return AnyOfSchema(path, schema)
if 'type' not in schema:
return OpaqueSchema(path, schema)
t = schema['type']
if t == 'string':
return StringSchema(path, schema)
Expand Down

0 comments on commit b99059d

Please sign in to comment.