Skip to content

Conversation

@liangchenye
Copy link
Member

Signed-off-by: liangchenye [email protected]

- $HOME/gopath/bin/golint ./...
- $HOME/gopath/bin/git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE}
- go test -v ./...
- make
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to drop the explicit vet and golint calls and have:

script:
    - $HOME/gopath/bin/git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE}
    - make all test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about test first then try to compile?

  • make test
  • make all

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine with me.

$(RUNTIME_TOOLS_LINK):
ln -sf $(CURDIR) $(RUNTIME_TOOLS_LINK)

.PHONY: test .gofmt .govet .golint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add .gotest here as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I miss this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing a .PHONY entry for .gotest?

rootfsDir := "rootfs"
rootfsNonDir := "rootfsfile"
rootfsNonExists := "rootfsnil"
os.MkdirAll(filepath.Join(tmpBundle, rootfsDir), 0750)
Copy link
Contributor

@wking wking Nov 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a test run entirely by one user, so you can use 0700 if you want to restrict permissions. Alternatively, you can use 0777 and rely on the caller's umask. But specifying 0750 seems like a strange middle ground ;).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just used to set 0750 to all the created dir. I don't mind to change it to 0700. Update comes soon.

expected bool
}{
{rspec.Version, true},
//FIXME: validate currently only handles rpsec.Version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CheckSemVer already has separate checks for “valid SemVer” and “recognized SemVer”. What we're missing is support for past versions of the spec, and that problem is more general than this single test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have the 'official supported version', so I prefer to keep this and update this once the problem of supporting past version is fixed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep this and update this once the problem of supporting past version is fixed.

That's fine, although it seems like a repo-wide issue that would be better served by a GitHub issue ;).

@Mashimiao
Copy link

Mashimiao commented Nov 22, 2016

LGTM

Approved with PullApprove

@liangchenye
Copy link
Member Author

ping @mrunalp @hqhq

rootfsDir := "rootfs"
rootfsNonDir := "rootfsfile"
rootfsNonExists := "rootfsnil"
os.MkdirAll(filepath.Join(tmpBundle, rootfsDir), 0700)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing error check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

rootfsNonDir := "rootfsfile"
rootfsNonExists := "rootfsnil"
os.MkdirAll(filepath.Join(tmpBundle, rootfsDir), 0700)
os.Create(filepath.Join(tmpBundle, rootfsNonDir))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing error check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@liangchenye
Copy link
Member Author

rebased, @mrunalp PTAL

@Mashimiao
Copy link

Mashimiao commented Mar 7, 2017

LGTM

Approved with PullApprove

@Mashimiao
Copy link

need rebase

@liangchenye
Copy link
Member Author

rebased, PTAL @Mashimiao @hqhq @mrunalp

@Mashimiao
Copy link

failed with CI

@liangchenye liangchenye force-pushed the unittest branch 2 times, most recently from e6b4918 to 176de83 Compare July 4, 2017 07:43
@liangchenye
Copy link
Member Author

updated @Mashimiao
Since we have validation/validation_test.go which is not UT, I added a UTDIRS to Makefile and now we will only do unit test under UTDIRS.

@Mashimiao
Copy link

Mashimiao commented Jul 4, 2017

LGTM

Approved with PullApprove

}
}

func TestCheckPlatform(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform is already removed from runtime-spec, so we don't need to add this is we're aiming at 1.0.

@liangchenye
Copy link
Member Author

'Platform' UT is removed @hqhq
I planed to remove the platform validation code this afternoon, but found it needs more time.
So I opened an issue to keep track of this.
#407

@hqhq
Copy link
Contributor

hqhq commented Jul 4, 2017

LGTM

Approved with PullApprove

1 similar comment
@Mashimiao
Copy link

Mashimiao commented Jul 4, 2017

LGTM

Approved with PullApprove

@Mashimiao Mashimiao merged commit e2da7df into opencontainers:master Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants