Skip to content

Commit

Permalink
test: added new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Jun 25, 2024
1 parent 0306506 commit 9d5a5b1
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 19 deletions.
4 changes: 4 additions & 0 deletions packages/spectrocloud-docs-internal/tests/longform/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
StylesPath = ../../styles/
MinAlertLevel = suggestion
[*.md]
spectrocloud-docs-internal.Longform = YES
15 changes: 15 additions & 0 deletions packages/spectrocloud-docs-internal/tests/longform/fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Debug Steps

Use the following steps to debug the issue.

1. Check the logs for any errors.

```shell
palette -h work -n <namespace>
```

2. Check the status of the pods.

```shell
kubeclt logs pod-name -n <namespace>
```
15 changes: 15 additions & 0 deletions packages/spectrocloud-docs-internal/tests/longform/pass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Debug Steps

Use the following steps to debug the issue.

1. Check the logs for any errors.

```shell
kubectl logs pod-name --namespace namespace
```

2. Check the status of the pods.

```shell
kubeclt logs pod-name --namespace <namespace>
```
36 changes: 17 additions & 19 deletions packages/spectrocloud/styles/spectrocloud/longform.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
# Copyright (c) Spectro Cloud
# SPDX-License-Identifier: Apache-2.0

---
extends: existence
message: "Avoid using the short form of commands. Replace the short form flag in '%s' with the corresponding long form flag."
link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Commands-%26-Parameters
level: error
ignorecase: false
scope: raw
tokens:
# Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h.
- (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+
# Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h.
- (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+
exceptions:
- ls([\s ]{1,}[-][a-zA-Z]{1,3})+
- cd([\s ]{1,}[-][a-zA-Z]{1,3})+
- cp([\s ]{1,}[-][a-zA-Z]{1,3})+
- mv([\s ]{1,}[-][a-zA-Z]{1,3})+
- rm([\s ]{1,}[-][a-zA-Z]{1,3})+
- mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+
- rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+
- cat([\s ]{1,}[-][a-zA-Z]{1,3})+
- pwd([\s ]{1,}[-][a-zA-Z]{1,3})+
- echo([\s ]{1,}[-][a-zA-Z]{1,3})+
- chmod([\s ]{1,}[-][a-zA-Z]{1,3})+
- chown([\s ]{1,}[-][a-zA-Z]{1,3})+
- sed([\s ]{1,}[-][a-zA-Z]{1,3})+
- wc([\s ]{1,}[-][a-zA-Z]{1,3})+
- tar([\s ]{1,}[-][a-zA-Z]{1,3})+
- ls([\s ]{1,}[-][a-zA-Z]{1,3})+
- cd([\s ]{1,}[-][a-zA-Z]{1,3})+
- cp([\s ]{1,}[-][a-zA-Z]{1,3})+
- mv([\s ]{1,}[-][a-zA-Z]{1,3})+
- rm([\s ]{1,}[-][a-zA-Z]{1,3})+
- mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+
- rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+
- cat([\s ]{1,}[-][a-zA-Z]{1,3})+
- pwd([\s ]{1,}[-][a-zA-Z]{1,3})+
- echo([\s ]{1,}[-][a-zA-Z]{1,3})+
- chmod([\s ]{1,}[-][a-zA-Z]{1,3})+
- chown([\s ]{1,}[-][a-zA-Z]{1,3})+
- sed([\s ]{1,}[-][a-zA-Z]{1,3})+
- wc([\s ]{1,}[-][a-zA-Z]{1,3})+
- tar([\s ]{1,}[-][a-zA-Z]{1,3})+
4 changes: 4 additions & 0 deletions packages/spectrocloud/tests/longform/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
StylesPath = ../../styles/
MinAlertLevel = suggestion
[*.md]
spectrocloud.Longform = YES
15 changes: 15 additions & 0 deletions packages/spectrocloud/tests/longform/fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Debug Steps

Use the following steps to debug the issue.

1. Check the logs for any errors.

```shell
palette -h work -n <namespace>
```

2. Check the status of the pods.

```shell
kubeclt logs pod-name -n <namespace>
```
15 changes: 15 additions & 0 deletions packages/spectrocloud/tests/longform/pass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Debug Steps

Use the following steps to debug the issue.

1. Check the logs for any errors.

```shell
kubectl logs pod-name --namespace namespace
```

2. Check the status of the pods.

```shell
kubeclt logs pod-name --namespace <namespace>
```

0 comments on commit 9d5a5b1

Please sign in to comment.