[Makefile] Add "test-instance"; Add "help" #231

Merged
lunny merged 3 commits from 6543/go-sdk:make-add-test-instance into master 2020-01-26 07:23:02 +00:00
Owner

add make test-instance

so if you execute make test-instance
you can test the sdk localy via make test in a second terminal

  • add make help
add **make test-instance** so if you execute `make test-instance` you can test the sdk localy via `make test` in a second terminal * add **make help**
6543 self-assigned this 2020-01-22 15:14:30 +00:00
6543 added the
kind/docs
kind/testing
labels 2020-01-22 15:14:53 +00:00
techknowlogick reviewed 2020-01-22 16:05:41 +00:00
Dismissed
Makefile Outdated
@ -25,2 +42,4 @@
cd gitea && go test -cover -coverprofile coverage.out
.PHONY: test-instance
test-instance:

the indentation of the below lines in this task are inconsistent

the indentation of the below lines in this task are inconsistent
Makefile Outdated
@ -33,1 +69,4 @@
cd gitea && go build
.PHONY: local-test
local-test:

In drone yaml the proxy settings (--noproxy and export HTTP_PROXY="") are needed due to drone agent settings, however on local they probably wouldn't be needed.

In drone yaml the proxy settings (`--noproxy` and `export HTTP_PROXY=""`) are needed due to drone agent settings, however on local they probably wouldn't be needed.

--noproxy still remains.

`--noproxy` still remains.
Author
Owner
@techknowlogick done
6543 changed title from [Makefile] Add "test-instance"; Add "local-test" to [Makefile] Add "test-instance"; Add "local-test"; Add "help" 2020-01-22 23:48:16 +00:00
techknowlogick reviewed 2020-01-22 23:56:04 +00:00
Dismissed
Makefile Outdated
@ -34,0 +71,4 @@
.PHONY: local-test
local-test:
@if [ -z "$(shell curl --noproxy "*" http://localhost:3000/api/v1/version 2> /dev/null)" ]; then echo "No test-instance detected!"; else \
export GITEA_SDK_TEST_URL="http://localhost:3000"; export GITEA_SDK_TEST_USERNAME="test01"; export GITEA_SDK_TEST_PASSWORD="test01"; \

perhaps we set these defaults at top of make file, and have them so they can be overridden.

perhaps we set these defaults at top of make file, and have them so they can be overridden.
Author
Owner

@techknowlogick like this?

@techknowlogick like this?
Author
Owner

then local-test is useless ... and I can add change to test ...

then `local-test` is useless ... and I can add change to `test` ...
6543 changed title from [Makefile] Add "test-instance"; Add "local-test"; Add "help" to [Makefile] Add "test-instance"; Add "help" 2020-01-23 01:00:11 +00:00
techknowlogick reviewed 2020-01-23 01:08:36 +00:00
Dismissed
Makefile Outdated
@ -1,8 +1,33 @@
WORK_DIR := $(shell pwd)
ifeq ($(GITEA_SDK_TEST_URL), )
export GITEA_SDK_TEST_URL := http://localhost:3000

Make supports overriding in the following format

EXAMPLE ?= testing

Where EXAMPLE would be testing unless set outside make

Make supports overriding in the following format ``` EXAMPLE ?= testing ``` Where `EXAMPLE` would be `testing` unless set outside make
Author
Owner

didn't know :D

didn't know :D
Author
Owner

need review

need review
lunny approved these changes 2020-01-26 02:48:57 +00:00
Dismissed
jolheiser approved these changes 2020-01-26 04:09:56 +00:00
Dismissed
jolheiser left a comment
Owner

I think running a full Gitea instance is a little overkill, but for the time being it's understandable unless we expect devs to download and use Docker.

I think running a full Gitea instance is a little overkill, but for the time being it's understandable unless we expect devs to download and use Docker.
Author
Owner

ready to merge 🚀 ?

and yes this will be impruved in future ...

ready to merge :rocket: ? and yes this will be impruved in future ...
lunny referenced this issue from a commit 2020-01-26 07:23:00 +00:00
[Makefile] Add "test-instance"; Add "help" (#231) PASSWORD_COMPLEXITY = off fix test Makefile: add "test-instance" (start a gitea instance for test) and add a help menue Fix ListIssue Functions (now respect ListIssueOption's) (#225) fix test add Test add more test cases and fix nice log add Issue Tests impruve more Repo Tests and mv createTestRepo introduce "createTestRepo" a standad func to create a repo for testing add workaround * Update Dates * Fix ListIssueOption Fix ListRepoPullRequests (#219) add ToDo notice add ListRepoPullRequests TEST remove useless drone config emtrys fmt ping CI add new Options from PR #217 use query params Add some PR list options (#217) Empty Commit Add enums Add some PR list options Add test framework (#227) [Extend] StopWatch struct & functions (#211) add StopWatch struct & functions [Add] reaction struct and functions (#213) add struct and functions Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] issue Un-/Subscription function (#214) fix lint add issue subscription function Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] GetBlob (#212) fix header from PR 206 add GetBlob Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: 6543 <6543@noreply.gitea.io> Add test framework (#227) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Add some PR list options (#217) Empty Commit Add enums Add some PR list options Add test framework (#227) [Extend] StopWatch struct & functions (#211) add StopWatch struct & functions [Add] reaction struct and functions (#213) add struct and functions Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] issue Un-/Subscription function (#214) fix lint add issue subscription function Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] GetBlob (#212) fix header from PR 206 add GetBlob Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: 6543 <6543@noreply.gitea.io> Add test framework (#227) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/225 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/231 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: John Olheiser <john.olheiser@gmail.com>
lunny closed this pull request 2020-01-26 07:23:02 +00:00
6543 deleted branch make-add-test-instance 2020-01-26 15:48:45 +00:00
lafriks referenced this issue from a commit 2020-01-27 06:20:53 +00:00
[Add] VersionCheck (#215) enable race test make go-vet happy code format secound Func RWMutex fix prevent race condition add TEST cleanup make go-version work without vendoring dont change library version use Server Version Check on NewClient save serverVersion Makefile: export test env var (#234) exporte test var to env on test target Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/234 Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: John Olheiser <john.olheiser@gmail.com> use golangci-lint and revive for linting (match main repo) (#220) Co-authored-by: 6543 <6543@noreply.gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/220 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: John Olheiser <john.olheiser@gmail.com> [Makefile] Add "test-instance"; Add "help" (#231) PASSWORD_COMPLEXITY = off fix test Makefile: add "test-instance" (start a gitea instance for test) and add a help menue Fix ListIssue Functions (now respect ListIssueOption's) (#225) fix test add Test add more test cases and fix nice log add Issue Tests impruve more Repo Tests and mv createTestRepo introduce "createTestRepo" a standad func to create a repo for testing add workaround * Update Dates * Fix ListIssueOption Fix ListRepoPullRequests (#219) add ToDo notice add ListRepoPullRequests TEST remove useless drone config emtrys fmt ping CI add new Options from PR #217 use query params Add some PR list options (#217) Empty Commit Add enums Add some PR list options Add test framework (#227) [Extend] StopWatch struct & functions (#211) add StopWatch struct & functions [Add] reaction struct and functions (#213) add struct and functions Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] issue Un-/Subscription function (#214) fix lint add issue subscription function Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] GetBlob (#212) fix header from PR 206 add GetBlob Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: 6543 <6543@noreply.gitea.io> Add test framework (#227) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Add some PR list options (#217) Empty Commit Add enums Add some PR list options Add test framework (#227) [Extend] StopWatch struct & functions (#211) add StopWatch struct & functions [Add] reaction struct and functions (#213) add struct and functions Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] issue Un-/Subscription function (#214) fix lint add issue subscription function Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> [Add] GetBlob (#212) fix header from PR 206 add GetBlob Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@noreply.gitea.io> Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: 6543 <6543@noreply.gitea.io> Add test framework (#227) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/225 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/231 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: John Olheiser <john.olheiser@gmail.com> Fix ListIssue Functions (now respect ListIssueOption's) (#225) fix test add Test add more test cases and fix nice log add Issue Tests impruve more Repo Tests and mv createTestRepo introduce "createTestRepo" a standad func to create a repo for testing add workaround * Update Dates * Fix ListIssu... Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/215 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Sign in to join this conversation.
No description provided.