
from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler

def get_schedulers():
    # Run the unit tests for master
    master_unit = SingleBranchScheduler(name="full",
                                 change_filter=ChangeFilter(branch="master"),
                                 treeStableTimer=60,
                                 builderNames=["vagrant-master-unit"])

    return [master_unit]


from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import (
    Dependent,
    SingleBranchScheduler)

def get_schedulers():
    # Run the unit tests for master
    master_unit = SingleBranchScheduler(name="master-unit",
                                 change_filter=ChangeFilter(branch="master"),
                                 treeStableTimer=60,
                                 builderNames=["vagrant-master-unit"])

    master_acceptance = Dependent(name="master-acceptance",
                                  upstream=master_unit,
                                  builderNames=["vagrant-master-acceptance"])

    return [master_unit, master_acceptance]

Make the acceptance tests dependent on the unit tests passing
Buildbot: Make the acceptance tests dependent on the unit tests passing

  
  from buildbot.changes.filter import ChangeFilter
- from buildbot.schedulers.basic import SingleBranchScheduler
+ from buildbot.schedulers.basic import (
+     Dependent,
+     SingleBranchScheduler)
  
  def get_schedulers():
      # Run the unit tests for master
-     master_unit = SingleBranchScheduler(name="full",
+     master_unit = SingleBranchScheduler(name="master-unit",
                                   change_filter=ChangeFilter(branch="master"),
                                   treeStableTimer=60,
                                   builderNames=["vagrant-master-unit"])
  
-     return [master_unit]
+     master_acceptance = Dependent(name="master-acceptance",
+                                   upstream=master_unit,
+                                   builderNames=["vagrant-master-acceptance"])
  
+     return [master_unit, master_acceptance]
+ 
Make the acceptance tests dependent on the unit tests passing
## Code Before:

from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler

def get_schedulers():
    # Run the unit tests for master
    master_unit = SingleBranchScheduler(name="full",
                                 change_filter=ChangeFilter(branch="master"),
                                 treeStableTimer=60,
                                 builderNames=["vagrant-master-unit"])

    return [master_unit]

## Instruction:
Make the acceptance tests dependent on the unit tests passing
## Code After:

from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import (
    Dependent,
    SingleBranchScheduler)

def get_schedulers():
    # Run the unit tests for master
    master_unit = SingleBranchScheduler(name="master-unit",
                                 change_filter=ChangeFilter(branch="master"),
                                 treeStableTimer=60,
                                 builderNames=["vagrant-master-unit"])

    master_acceptance = Dependent(name="master-acceptance",
                                  upstream=master_unit,
                                  builderNames=["vagrant-master-acceptance"])

    return [master_unit, master_acceptance]
