This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "index" : { | |
| "default_pipeline": "metrics-forwarder" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "index_patterns": [ | |
| "legacy-index*" | |
| ], | |
| "template": { | |
| "settings": { | |
| "number_of_shards": 1, | |
| "number_of_replicas": 1, | |
| "default_pipeline": "metrics-forwarder", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "policy": { | |
| "description": "Metrics retention policy", | |
| "default_state": "hot", | |
| "schema_version": 1, | |
| "states": [ | |
| { | |
| "name": "hot", | |
| "actions": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "index_patterns": [ | |
| "metrics" | |
| ], | |
| "data_stream": {}, | |
| "priority": 100, | |
| "template": { | |
| "settings": { | |
| "number_of_shards": 2, | |
| "number_of_replicas": 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "description": "forward docs to data stream", | |
| "processors": [ | |
| { | |
| "set": { | |
| "field": "_index", | |
| "value": "metrics" | |
| } | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @pytest.mark.django_db | |
| class TestWithVault: | |
| def setup_method(self, method): | |
| recursive_delete_secrets('startpath') | |
| def teardown_method(self, method): | |
| recursive_delete_secrets('startpath') | |
| def test_yourtestcase(self, client): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type MockRobotsClient struct { | |
| iter int64 | |
| Mocks []RobotRules | |
| } | |
| func NewMockRobotsClient(mocks []RobotRules) Roboteer { | |
| return &MockRobotsClient{Mocks: mocks} | |
| } | |
| func (m *MockRobotsClient) FetchRobots(url string) (RobotRules, error) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var robots = ` | |
| # Group 1 | |
| User-agent: Googlebot | |
| Disallow: /nogooglebot/ | |
| # Group 2 | |
| User-agent: * | |
| Allow: / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Rule struct { | |
| UserAgents []string | |
| Disallow []string | |
| Allow []string | |
| } | |
| func (r Rule) isEmpty() bool { | |
| return (len(r.UserAgents) + len(r.Disallow) + len(r.Allow)) == 0 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def recursive_delete_secrets(start_path): | |
| paths = set() | |
| def recursive_lookup(path): | |
| try: | |
| response = settings.VAULT_CLIENT.secrets.kv.v2.list_secrets( | |
| path=path, | |
| mount_point=settings.VAULT_MOUNTPOINT | |
| ) | |
| except hvac.exceptions.InvalidPath: |
NewerOlder