Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename packages #93

Merged
merged 2 commits into from
Apr 12, 2024
Merged
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
6 changes: 3 additions & 3 deletions commands/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"strings"
"time"

"github.com/ms-henglu/armstrong/report"
"github.com/ms-henglu/armstrong/tf"
"github.com/ms-henglu/armstrong/types"
"github.com/azure/armstrong/report"
"github.com/azure/armstrong/tf"
"github.com/azure/armstrong/types"
"github.com/ms-henglu/pal/trace"
"github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/credential_scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"time"

"github.com/ms-henglu/armstrong/coverage"
"github.com/ms-henglu/armstrong/hcl"
"github.com/azure/armstrong/coverage"
"github.com/azure/armstrong/hcl"
"github.com/sirupsen/logrus"
)

Expand Down
12 changes: 6 additions & 6 deletions commands/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (
"sort"
"strings"

"github.com/azure/armstrong/autorest"
"github.com/azure/armstrong/resource"
"github.com/azure/armstrong/resource/resolver"
"github.com/azure/armstrong/resource/types"
"github.com/azure/armstrong/swagger"
"github.com/azure/armstrong/utils"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/ms-henglu/armstrong/autorest"
"github.com/ms-henglu/armstrong/resource"
"github.com/ms-henglu/armstrong/resource/resolver"
"github.com/ms-henglu/armstrong/resource/types"
"github.com/ms-henglu/armstrong/swagger"
"github.com/ms-henglu/armstrong/utils"
"github.com/sirupsen/logrus"
"golang.org/x/exp/slices"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"path"
"testing"

"github.com/ms-henglu/armstrong/commands"
"github.com/ms-henglu/armstrong/tf"
"github.com/azure/armstrong/commands"
"github.com/azure/armstrong/tf"
)

func TestGenerateCommand_multiple(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion commands/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/ms-henglu/armstrong/report"
"github.com/azure/armstrong/report"
"github.com/sirupsen/logrus"
)

Expand Down
10 changes: 5 additions & 5 deletions commands/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"strings"
"time"

"github.com/ms-henglu/armstrong/coverage"
"github.com/ms-henglu/armstrong/report"
"github.com/ms-henglu/armstrong/tf"
"github.com/ms-henglu/armstrong/types"
"github.com/ms-henglu/armstrong/utils"
"github.com/azure/armstrong/coverage"
"github.com/azure/armstrong/report"
"github.com/azure/armstrong/tf"
"github.com/azure/armstrong/types"
"github.com/azure/armstrong/utils"
"github.com/ms-henglu/pal/formatter"
"github.com/ms-henglu/pal/trace"
paltypes "github.com/ms-henglu/pal/types"
Expand Down
2 changes: 1 addition & 1 deletion commands/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"

"github.com/ms-henglu/armstrong/tf"
"github.com/azure/armstrong/tf"
"github.com/sirupsen/logrus"
)

Expand Down
6 changes: 3 additions & 3 deletions coverage/coverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"path"
"testing"

"github.com/ms-henglu/armstrong/coverage"
"github.com/ms-henglu/armstrong/report"
"github.com/ms-henglu/armstrong/types"
"github.com/azure/armstrong/coverage"
"github.com/azure/armstrong/report"
"github.com/azure/armstrong/types"
)

type testCase struct {
Expand Down
2 changes: 1 addition & 1 deletion coverage/expand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"testing"
"time"

"github.com/azure/armstrong/coverage"
"github.com/go-openapi/jsonreference"
openapispec "github.com/go-openapi/spec"
"github.com/ms-henglu/armstrong/coverage"
)

func TestExpand_MediaTransform(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion coverage/from_local_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path/filepath"
"strings"

"github.com/azure/armstrong/utils"
openapispec "github.com/go-openapi/spec"
"github.com/ms-henglu/armstrong/utils"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion coverage/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/ms-henglu/armstrong/coverage"
"github.com/azure/armstrong/coverage"
)

func TestGetModelInfoFromIndex_DataCollectionRule(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dependency/azapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dependency_test
import (
"testing"

"github.com/ms-henglu/armstrong/dependency"
"github.com/azure/armstrong/dependency"
)

func Test_LoadAzapiDependencies(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dependency/azurerm.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"sync"

"github.com/ms-henglu/armstrong/dependency/azurerm"
"github.com/azure/armstrong/dependency/azurerm"
)

var azurermMutex = sync.Mutex{}
Expand Down
2 changes: 1 addition & 1 deletion dependency/azurerm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dependency_test
import (
"testing"

"github.com/ms-henglu/armstrong/dependency"
"github.com/azure/armstrong/dependency"
)

func Test_LoadAzurermDependencies(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dependency/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"

"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
"github.com/ms-henglu/armstrong/utils"
"github.com/azure/armstrong/utils"
)

type Pattern struct {
Expand Down
2 changes: 1 addition & 1 deletion dependency/pattern_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dependency_test
import (
"testing"

"github.com/ms-henglu/armstrong/dependency"
"github.com/azure/armstrong/dependency"
)

func Test_NewPattern(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions docs/guidance-for-api-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This [video](https://microsoftapc-my.sharepoint.com/:v:/g/personal/henglu_micros
## Prerequisites

1. [Install](https://github.com/Azure/oav#how-to-install-the-tool) the latest oav
2. [Install](https://github.com/ms-henglu/armstrong#install) the latest armstrong
2. [Install](https://github.com/azure/armstrong#install) the latest armstrong
3. Prepare the swagger definitions and examples that you need to test

## Step-By-Step
Expand Down Expand Up @@ -68,7 +68,7 @@ It also supports to specify the directory where the swagger json file resides in
armstrong generate -swagger ..
```

More details about the usage of `armstrong generate` can be found [here](https://github.com/ms-henglu/armstrong#generate---generate-testing-files).
More details about the usage of `armstrong generate` can be found [here](https://github.com/azure/armstrong#generate---generate-testing-files).

Then the test cases will be generated in the folder. The test case folder name is in the format of `{provider}_{resourceType}`. For example, the test case folder name for `Microsoft.Purview/accounts` is `Microsoft.Purview_accounts`.
The folder structure will look like below:
Expand Down Expand Up @@ -228,7 +228,7 @@ The following command generates a speculative execution plan, showing what actio
armstrong validate
```

More details about the usage of `armstrong validate` can be found [here](https://github.com/ms-henglu/armstrong#validate---validate-the-changes).
More details about the usage of `armstrong validate` can be found [here](https://github.com/azure/armstrong#validate---validate-the-changes).

4. Test the test case.

Expand All @@ -242,7 +242,7 @@ armstrong test -swagger ../.. --destroy-after-test

Above command uses a relative path to the directory where the swagger json file resides in.

More details about the usage of `armstrong test` can be found [here](https://github.com/ms-henglu/armstrong#test---run-tests).
More details about the usage of `armstrong test` can be found [here](https://github.com/azure/armstrong#test---run-tests).

5. Check the output.

Expand Down Expand Up @@ -302,7 +302,7 @@ armstrong report -swagger ..

Above command uses a relative path to the directory where the swagger json file resides in.

More details about the usage of `armstrong report` can be found [here](https://github.com/ms-henglu/armstrong#report---generate-a-summary-report).
More details about the usage of `armstrong report` can be found [here](https://github.com/azure/armstrong#report---generate-a-summary-report).

If it runs successfully, the summary reports will be generated in `ArmstrongReport` folder. The folder structure will look like below:

Expand Down Expand Up @@ -718,4 +718,4 @@ resource "azapi_resource" "kafkaConfiguration" {

## Samples

Please refer to the [sample repo](https://github.com/ms-henglu/armstrong-demo) for more details.
Please refer to the [sample repo](https://github.com/azure/armstrong-demo) for more details.
2 changes: 1 addition & 1 deletion examples/demo/case1 - test passed/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Command

Logs

1. Genreate testing files, [dependency.tf](https://github.com/ms-henglu/armstrong/blob/master/examples/demos/case1%20-%20test%20passed/dependency.tf) and [testing.tf](https://github.com/ms-henglu/armstrong/blob/master/examples/demos/case1%20-%20test%20passed/testing.tf).
1. Genreate testing files, [dependency.tf](https://github.com/azure/armstrong/blob/master/examples/demos/case1%20-%20test%20passed/dependency.tf) and [testing.tf](https://github.com/azure/armstrong/blob/master/examples/demos/case1%20-%20test%20passed/testing.tf).
```
2021/11/24 13:39:42 [INFO] command: auto, args: [C:\Users\henglu\go\src\github.com\Azure\azure-rest-api-specs\specification\batch\resource-manager\Microsoft.Batch\stable\2021-06-01\examples\ApplicationCreate.json]
2021/11/24 13:39:42 [INFO] ----------- generate dependency and test resource ---------
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/case2 - found API bug/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Command

Logs

1. Genreate testing files, [dependency.tf](https://github.com/ms-henglu/armstrong/blob/master/examples/demos/case2%20-%20found%20API%20bug/dependency.tf) and [testing.tf](https://github.com/ms-henglu/armstrong/blob/master/examples/demos/case2%20-%20found%20API%20bug/testing.tf).
1. Genreate testing files, [dependency.tf](https://github.com/azure/armstrong/blob/master/examples/demos/case2%20-%20found%20API%20bug/dependency.tf) and [testing.tf](https://github.com/azure/armstrong/blob/master/examples/demos/case2%20-%20found%20API%20bug/testing.tf).
```
2021/11/24 13:42:17 [INFO] command: auto, args: [C:\Users\henglu\go\src\github.com\Azure\azure-rest-api-specs\specification\appplatform\resource-manager\Microsoft.AppPlatform\stable\2020-07-01\examples\Apps_CreateOrUpdate.json]
2021/11/24 13:42:17 [INFO] ----------- generate dependency and test resource ---------
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/case3 - complicated dependency/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Command

Logs

1. Genreate testing files, [dependency.tf](https://github.com/ms-henglu/armstrong/blob/master/examples/demos/case3%20-%20complicated%20dependency/dependency.tf) and [testing.tf](https://github.com/ms-henglu/armstrong/blob/master/examples/demos/case3%20-%20complicated%20dependency/testing.tf).
1. Genreate testing files, [dependency.tf](https://github.com/azure/armstrong/blob/master/examples/demos/case3%20-%20complicated%20dependency/dependency.tf) and [testing.tf](https://github.com/azure/armstrong/blob/master/examples/demos/case3%20-%20complicated%20dependency/testing.tf).
```
2021/11/24 15:47:11 [INFO] ----------- generate dependency and test resource ---------
2021/11/24 15:47:11 [INFO] loading dependencies
Expand Down
8 changes: 4 additions & 4 deletions examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ This is an example of testing the API which manages `Microsoft.DBforPostgreSQL/s

This example demonstrates how to test the API which has a dependency on itself.

More details can be found [here](https://github.com/ms-henglu/armstrong/tree/main/examples/Microsoft.DBforPostgreSQL_serverGroupsv2%402022-11-08).
More details can be found [here](https://github.com/azure/armstrong/tree/main/examples/Microsoft.DBforPostgreSQL_serverGroupsv2%402022-11-08).

## Example 2

This is an example of testing the API which manages `Microsoft.Network/virtualHubs/routeMaps@2022-07-01` resource.

This example demonstrates how to fix the configuration and continue the test when encounter errors.

More details can be found [here](https://github.com/ms-henglu/armstrong/tree/main/examples/Microsoft.Network_virtualHubs_routeMaps%402022-07-01).
More details can be found [here](https://github.com/azure/armstrong/tree/main/examples/Microsoft.Network_virtualHubs_routeMaps%402022-07-01).

## Example 3

This is an example of testing the API which manages `Microsoft.Insights/dataCollectionRules@2022-06-01` resource.

This example demonstrates how to test the API which has a implicit dependency.

More details can be found [here](https://github.com/ms-henglu/armstrong/tree/main/examples/Microsoft.Insights_dataCollectionRules%402022-06-01).
More details can be found [here](https://github.com/azure/armstrong/tree/main/examples/Microsoft.Insights_dataCollectionRules%402022-06-01).

## Other examples

There're some examples in the [demo folder](https://github.com/ms-henglu/armstrong/tree/main/examples/demo). These examples are used to demonstrate how to use `armstrong` to test ARM API.
There're some examples in the [demo folder](https://github.com/azure/armstrong/tree/main/examples/demo). These examples are used to demonstrate how to use `armstrong` to test ARM API.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ms-henglu/armstrong
module github.com/azure/armstrong

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion hcl/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package hcl_test
import (
"testing"

"github.com/ms-henglu/armstrong/hcl"
"github.com/azure/armstrong/hcl"
)

func Test_MarshalIndent(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion hcl/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package hcl_test
import (
"testing"

"github.com/ms-henglu/armstrong/hcl"
"github.com/azure/armstrong/hcl"
)

func TestParseAzapiResource(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"log"
"os"

"github.com/azure/armstrong/commands"
"github.com/mitchellh/cli"
"github.com/ms-henglu/armstrong/commands"
"github.com/sirupsen/logrus"
)

Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ For ARM review, please refer to [guidance for API test](./docs/guidance-for-api-

#### Install from the binary:

1. Download the binary from [releases](https://github.com/ms-henglu/armstrong/releases).
1. Download the binary from [releases](https://github.com/azure/armstrong/releases).

2. It's recommended to add the directory containing the binary to your `PATH`, so that you can run `armstrong` directly.

#### Install from the source code:

1. Install [Go](https://golang.org/doc/install).

2. Run `go install github.com/ms-henglu/armstrong@latest` to install the latest version.
2. Run `go install github.com/azure/armstrong@latest` to install the latest version.

3. It's recommended to add `$GOPATH/bin` to your `PATH`, so that you can run `armstrong` directly.

Expand Down Expand Up @@ -154,7 +154,7 @@ Armstrong also output different kinds of reports:
2. `errors.md`: A markdown report which contains scan errors.

## How to use?
1. Install this tool: `go install github.com/ms-henglu/armstrong`, or download it from [releases](https://github.com/ms-henglu/armstrong/releases).
1. Install this tool: `go install github.com/azure/armstrong`, or download it from [releases](https://github.com/azure/armstrong/releases).
2. Generate terraform files and Test
1. Generate testing files by running `armstrong generate -path {path to a swagger 'Create' example}`.
Here's an example:
Expand Down
2 changes: 1 addition & 1 deletion report/api_test_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sort"
"strings"

"github.com/ms-henglu/armstrong/utils"
"github.com/azure/armstrong/utils"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion report/cleanup_error_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
_ "embed"
"strings"

"github.com/ms-henglu/armstrong/types"
"github.com/azure/armstrong/types"
paltypes "github.com/ms-henglu/pal/types"
)

Expand Down
2 changes: 1 addition & 1 deletion report/cleanup_passed_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ms-henglu/armstrong/types"
"github.com/azure/armstrong/types"
)

//go:embed cleanup_passed_report.md
Expand Down
2 changes: 1 addition & 1 deletion report/diff_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/ms-henglu/armstrong/types"
"github.com/azure/armstrong/types"
"github.com/nsf/jsondiff"
)

Expand Down
2 changes: 1 addition & 1 deletion report/diff_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
_ "embed"
"strings"

"github.com/ms-henglu/armstrong/types"
"github.com/azure/armstrong/types"
paltypes "github.com/ms-henglu/pal/types"
)

Expand Down
Loading
Loading