Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions apply-license.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

function apply_license {
temp_file=$(mktemp)

cat << HEREDOC > $temp_file
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

HEREDOC

cat $1 >> $temp_file

mv $temp_file $1
}


FILES_1=$(find {pyrandall,tests} -type f -name "*.py")
FILES_2=$(find {pyrandall,examples} -type f -name "*.yaml")
for f in $FILES_1 $FILES_2; do
apply_license $f;
done
15 changes: 15 additions & 0 deletions examples/scenarios/http/simulate_200.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v2
feature:
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/http/simulate_400.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v2
feature:
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/http/validate_bad_status_code.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v2
feature:
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/http/validate_ok_status_code.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v2
feature:
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/one_event.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v2
feature:
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/v1.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v1
scenario:
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/v2.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v2
feature:
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/v2_broker_kafka.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

version: scenario/v2
feature:
description: Send a request and receive on a kafka topic
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/v2_ingest_kafka_invalid.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

version: scenario/v2
feature:
description: Send a request and receive on a kafka topic
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/v2_ingest_kafka_small.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

version: scenario/v2
feature:
description: Send a request and receive on a kafka topic
Expand Down
15 changes: 15 additions & 0 deletions examples/scenarios/v2_requests_http.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

---
version: scenario/v2
feature:
Expand Down
15 changes: 15 additions & 0 deletions pyrandall/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

from . import exceptions, types
from .hookspecs import _hookimpl as hookimpl

Expand Down
15 changes: 15 additions & 0 deletions pyrandall/behaviors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

import json

import pyrandall
Expand Down
15 changes: 15 additions & 0 deletions pyrandall/cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

import json
import sys
from argparse import ArgumentParser
Expand Down
15 changes: 15 additions & 0 deletions pyrandall/commander.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

from . import executors
from .reporter import Reporter
from .spec import Adapter
Expand Down
15 changes: 15 additions & 0 deletions pyrandall/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

INVALID_VERSION_MSG = (
"Unsupported schema version for pyrandall. " "Please choose from: {}"
)
Expand Down
15 changes: 15 additions & 0 deletions pyrandall/executors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

from .broker_kafka import BrokerKafka
from .common import Executor
from .requests_http import RequestHttp, RequestHttpEvents
Expand Down
15 changes: 15 additions & 0 deletions pyrandall/executors/broker_kafka.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

from pyrandall.kafka import KafkaConn
from pyrandall.types import Assertion, ExecutionMode, UnorderedDiffAssertion
from .common import Executor
Expand Down
15 changes: 15 additions & 0 deletions pyrandall/executors/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2019 KPN N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========================================================================

from abc import ABC, abstractmethod


Expand Down
Loading