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

Support loading test cases from git repository #103

Closed
LinuxSuRen opened this issue Jun 26, 2023 · 10 comments · Fixed by #165
Closed

Support loading test cases from git repository #103

LinuxSuRen opened this issue Jun 26, 2023 · 10 comments · Fixed by #165
Assignees
Labels
enhancement New feature or request

Comments

@LinuxSuRen
Copy link
Owner

LinuxSuRen commented Jun 26, 2023

Expected usage: atest run -p https://github.com/LinuxSuRen/api-testing/tree/master/sample --auth personal-token

We need to consider the git branch and auth. Usually, the branch name could found from the URL. We could manipulate the git repository via jenkins-x/go-scm.

UI

In many cases, people will deploy a private Gitlab, and provide it to the team. Having an oauth integration might be a good idea for the users. They could login with their own account. So, we don't need to consider the user management.

See also the similar issue #94

@LinuxSuRen LinuxSuRen added enhancement New feature or request good first issue Good for newcomers labels Jun 26, 2023
@cestlive
Copy link

Read raw data from a git respository and unmarshall the raw content into Suits ?

@LinuxSuRen
Copy link
Owner Author

Read raw data from a git respository and unmarshall the raw content into Suits ?

Yes, I'm thinking about making a git repository as the storage backend. So, we don't have a central storage. And users could choose a private git repository to store their test cases. For example, store them into a private Gitlab.

@cestlive
Copy link

Read raw data from a git respository and unmarshall the raw content into Suits ?

Yes, I'm thinking about making a git repository as the storage backend. So, we don't have a central storage. And users could choose a private git repository to store their test cases. For example, store them into a private Gitlab.

Get it. Let me try to create a pr to handle it

@LinuxSuRen
Copy link
Owner Author

Get it. Let me try to create a pr to handle it

Sure. I'm looking forward it.

@cestlive
Copy link

In many cases,

I have a question:

atest run -p https://github.com/LinuxSuRen/api-testing/tree/master/sample

the [pattern ](https://github.com/LinuxSuRen/api-testing/tree/master/sample) will point to a specific yaml file or a directory?

@LinuxSuRen
Copy link
Owner Author

In my view, some basic information of a git repo are necessary. Such as: repo URL, branch name, directory. For a private git repository, the auth is required as well.

@LinuxSuRen
Copy link
Owner Author

hi @cestlive , you can create a new extension with the git feature. See also the existing ones:

https://github.com/LinuxSuRen/api-testing/tree/master/extensions

@LinuxSuRen
Copy link
Owner Author

go-git/go-git is a good candidate too. For the extension part, developers could get the connection information from the following code:

store := remote.GetStoreFromContext(ctx)

@LinuxSuRen
Copy link
Owner Author

Another solution is that making git repository as a SQL server. Such as: dolthub/dolt.

@LinuxSuRen
Copy link
Owner Author

hi @cestlive , I'm going to take over this due to no active response in 3 month. Feel free to join me if you're still intested in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants