Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aelsabbahy committed Jul 26, 2016
1 parent eec2d51 commit e06f688
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 21 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,21 @@ package:
```
## Supported resources
* addr - addr is reachable
* command - command, exit status and outputs
* dns - dns is resolvable
* file - file exists, owner/perm, content
* group - group, uid
* package - package is installed, versions
* port - port is listening, listening ip
* process - process is running
* service - running, enabled
* user - uid, home, etc..
* kernel-param - value
* mount - mountpoint, mount opts, fstype, etc..
* interface - network interface name and addrs
* package - add new package
* file - add new file
* addr - add new remote address:port - ex: google.com:80
* port - add new listening [protocol]:port - ex: 80 or udp:123
* service - add new service
* user - add new user
* group - add new group
* command - add new command
* dns - add new dns
* process - add new process name
* kernel-param - add new kernel-param
* mount - add new mount
* interface - add new network interface
* http - add new network http url
* goss - add new goss file, it will be imported from this one
## Supported output formats
* rspecish **(default)** - Similar to rspec output
Expand Down
7 changes: 0 additions & 7 deletions add.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,6 @@ func AutoAddResource(fileName string, gossConfig GossConfig, key string, c *cli.
}
}

// HTTPs
if strings.HasPrefix(key, "http://") || strings.HasPrefix(key, "https://") {
if res, _, ok := gossConfig.HTTPs.AppendSysResourceIfExists(key, sys); ok == true {
resourcePrint(fileName, res)
}
}

// group
if res, _, ok := gossConfig.Groups.AppendSysResourceIfExists(key, sys); ok == true {
resourcePrint(fileName, res)
Expand Down
21 changes: 20 additions & 1 deletion docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* [kernel-param](#kernel-param)
* [mount](#mount)
* [interface](#interface)
* [http](#http)
* [gossfile](#gossfile)
* [Patterns](#patterns)
* [Advanced Matchers](#advanced-matchers)
Expand Down Expand Up @@ -117,6 +118,7 @@ Will **NOT** automatically add:
* kernel-param
* mount
* interface
* http


### Example:
Expand Down Expand Up @@ -176,9 +178,9 @@ This will add a test for a resource. Non existent resources will add a test to e
* kernel-param - add new kernel-param
* mount - add new mount
* interface - add new network interface
* http - add new network http url
* goss - add new goss file, it will be imported from this one


### Flags
#### --exclude-attr
Ignore **non-required** attribute(s) matching the provided glob when adding a new resource, may be specified multiple times.
Expand Down Expand Up @@ -375,12 +377,29 @@ Validates network interface values
```yaml
interface:
eth0:
# required attributes
exists: true
# optional attributes
addrs:
- 172.17.0.2/16
- fe80::42:acff:fe11:2/64
```

### http
Validates http code and content
*Note:* Goss will automatically follow redirects

```yaml
http:
https://www.google.com:
# required attributes
status: 200
# optional attributes
allow-insecure: false
timeout: 1000
body: []
```

### gossfile
Import another goss file from this one.
```yaml
Expand Down

0 comments on commit e06f688

Please sign in to comment.