Skip to content

Proper discovery of spec files #288

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

Merged
merged 1 commit into from
Mar 10, 2016
Merged

Conversation

glennmatthews
Copy link
Member

Instead of hard-coding individual RSpec spec files in the Rakefile, do the following:

  • Task :spec_common covers all files in the main spec/ directory in one task
  • Files that need a clean environment for each test (the client loader specs) have been moved to a spec/isolate/ subdirectory, and the Rakefile automatically creates a separate task for each file found in this directory.

With this change, we should no longer need to update the Rakefile every time we add a new spec file.

glmatthe@fe-ucs36:~/cisco-network-node-utils$ rake spec

non-ruby files
  should have no trailing whitespace

schema.yaml
  should have no schema metavalidation errors

snmp_notification_receiver.yaml
  should have no schema validation errors

encapsulation.yaml
  should have no schema validation errors

aaa_authentication_login.yaml
  should have no schema validation errors

syslog_settings.yaml
  should have no schema validation errors

yum.yaml
  should have no schema validation errors

fabricpath.yaml
  should have no schema validation errors

interface_channel_group.yaml
  should have no schema validation errors

tacacs_server_host.yaml
  should have no schema validation errors

show_system.yaml
  should have no schema validation errors

vdc.yaml
  should have no schema validation errors

virtual_service.yaml
  should have no schema validation errors

ospf.yaml
  should have no schema validation errors

interface.yaml
  should have no schema validation errors

vrf_af.yaml
  should have no schema validation errors

vtp.yaml
  should have no schema validation errors

pim.yaml
  should have no schema validation errors

system.yaml
  should have no schema validation errors

ntp_server.yaml
  should have no schema validation errors

bgp_neighbor.yaml
  should have no schema validation errors

syslog_server.yaml
  should have no schema validation errors

bridge_domain.yaml
  should have no schema validation errors

vxlan_vtep.yaml
  should have no schema validation errors

aaa_auth_login_service.yaml
  should have no schema validation errors

tacacs_server.yaml
  should have no schema validation errors

interface_ospf.yaml
  should have no schema validation errors

bgp.yaml
  should have no schema validation errors

radius_server_group.yaml
  should have no schema validation errors

fex.yaml
  should have no schema validation errors

evpn_vni.yaml
  should have no schema validation errors

acl.yaml
  should have no schema validation errors

bgp_af.yaml
  should have no schema validation errors

snmp_community.yaml
  should have no schema validation errors

radius_server.yaml
  should have no schema validation errors

vrf.yaml
  should have no schema validation errors

vpc.yaml
  should have no schema validation errors

aaa_authorization_service.yaml
  should have no schema validation errors

fabricpath_topology.yaml
  should have no schema validation errors

images.yaml
  should have no schema validation errors

show_version.yaml
  should have no schema validation errors

tacacs_server_group.yaml
  should have no schema validation errors

vxlan_vtep_vni.yaml
  should have no schema validation errors

dnsclient.yaml
  should have no schema validation errors

interface_service_vni.yaml
  should have no schema validation errors

interface_portchannel.yaml
  should have no schema validation errors

overlay_global.yaml
  should have no schema validation errors

stp_global.yaml
  should have no schema validation errors

bgp_neighbor_af.yaml
  should have no schema validation errors

radius_global.yaml
  should have no schema validation errors

vlan.yaml
  should have no schema validation errors

snmp_group.yaml
  should have no schema validation errors

snmp_user.yaml
  should have no schema validation errors

memory.yaml
  should have no schema validation errors

snmpnotification.yaml
  should have no schema validation errors

portchannel_global.yaml
  should have no schema validation errors

feature.yaml
  should have no schema validation errors

inventory.yaml
  should have no schema validation errors

snmp_server.yaml
  should have no schema validation errors

ntp_config.yaml
  should have no schema validation errors

Finished in 0.14072 seconds (files took 0.17132 seconds to load)
60 examples, 0 failures


when no client implementations are installed
  should not have any clients
  should fail Client.create

Finished in 0.19344 seconds (files took 0.11072 seconds to load)
2 examples, 0 failures


when only NXAPI client is installed
  should have NXAPI client

Finished in 0.07852 seconds (files took 0.10975 seconds to load)
1 example, 0 failures


when both clients are installed
  should have both clients

Finished in 0.14519 seconds (files took 0.10799 seconds to load)
1 example, 0 failures


when only gRPC client is installed
  should have gRPC client

Finished in 0.16991 seconds (files took 0.10424 seconds to load)
1 example, 0 failures

@robert-w-gries
Copy link
Contributor

👍

glennmatthews pushed a commit that referenced this pull request Mar 10, 2016
Proper discovery of spec files
@glennmatthews glennmatthews merged commit 2f04850 into develop Mar 10, 2016
@glennmatthews glennmatthews deleted the feature/cleaner-spec branch March 10, 2016 20:56
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.

2 participants